I have a web scenario that uses basic auth to a host to fetch a page that returns semicolon-separated values. I have "Retrieve mode" set to "Body" but I can't see the retrieved body anywhere? Does it get set to a macro, or do I have to assign it to a macro with the Variables field, or what? Documentation seems a bit sparse on this specific aspect.
Ad Widget
Collapse
Web scenario body
Collapse
X
-
-
Web scenario does not record the output...
If you need those retrieved values for something, there is a "http item" ...https://www.zabbix.com/documentation...web_monitoring
The following information is collected in any web scenario:- average download speed per second for all steps of whole scenario
- number of the step that failed
- last error message
The following information is collected in any web scenario step:- download speed per second
- response time
- response code
-
OK.....that's completely baffling. Not only is it annoying that it doesn't do anything with the body, it's annoying that it doesn't mention this caveat in the documentation, given that it is such an obvious thing that it should be doing!
Zabbix is great but can be so frustrating at times.Comment
-
This doesn't seem to work how the documentation says it should.
"Web page source as text (including headers)" is what is supposed to be returned by web.page.get.
If I look in Latest Data, all I see is the headers:
If I test it with curl [because it's using curl, right?], I get the actual content:Code:2022-11-04 11:08:54 HTTP/1.0 200 OK Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) Content-type: text/html
Code:* Trying 192.168.1.88:80... * Connected to inverter (192.168.1.88) port 80 (#0) * Server auth using Basic with user 'admin' > GET /inverter.cgi HTTP/1.1 > Host: inverter > Authorization: Basic xxxxx > User-Agent: curl/7.86.0 > Accept: */* > * Mark bundle as not supporting multiuse * HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip) < Content-type: text/html < 9a02050f27070714;780036;205;21.0;600;1.300000;d;NO; * Closing connection 0
Comment
-
Well.. if docs list all the data it DOES record, then is it really necessary to write down, that "everything else is not recorded"? There is absolutely no need for a web scenario to record all the received data as it does not require it.OK.....that's completely baffling. Not only is it annoying that it doesn't do anything with the body, it's annoying that it doesn't mention this caveat in the documentation, given that it is such an obvious thing that it should be doing!
Zabbix is great but can be so frustrating at times.
What concerns web.page.get, I dot really know what it uses. It is an agent item and there is no requirement for running anything curl on that host... But I guess it has some compiled in curl support
I tested here, I did get more than headers back, so you may have some wonky item config there...
But web.page.get was not exactly the item I suggested... I was referring to the item of type "HTTP item" https://www.zabbix.com/documentation...itemtypes/http It is much more capable than web-page.get...
Comment
-
Obviously listing all the things it doesn't do would be absurd.
But given that a) Zabbix is a thing that people use to collect data b) You can tell Zabbix to check the body content in a web scenario c) Some of the data collected by a web scenario is kept, then it seems obvious to me that d) You would be able to do something with the body that was fetched.
In this case it is a matter of expectations and what is "obvious". I think polling the body to match a "Required string" but then discarding it is worthy of a caveat in the documentation, at least.
This is bordering on the tautological - it doesn't record it, because recording it is not implemented.
Well, as it turns out....I tried all three methods of HTTP fetching and gave up, so ended up using wget in a cron job to collect the body, write it to a file, then using a log[] item to bring it in to Zabbix. Works fine.
I happened to unintentionally open the log file with vim and can see that there are lots of NULs in the body. This is probably what was throwing it off. The NULs are not apparent when using cat or having wget output to stdout, so I didn't pick up on this earlier.Comment
Comment