Has anyone implemented webservice monitoring with Zabbix? Any idea on steps to be followed would help.
Ad Widget
Collapse
web service monitoring
Collapse
X
-
-
good web service example in the doc
-
@Imgray The link you provided is a great example of a web scenario not of a web service.
I am also looking for an example of a web service; I basically need to process a JSON output e.g. https://jsonplaceholder.typicode.com/todos/1Comment
-
Go to Configuration >> Hosts, and choose the Web tab under the machine that you want to do the web monitoring, by default you can use the machine where zabbix is installed.
Then Create web scenario in the right upper corner, give it a name for example like "X webmail", right in New application "Web checks", and select the Agent as you want, for max compatiblity I use "Internet Explorer 11.0". After this go to Steps tab and add the target website, choose a name like "x webmail" and add the URL, and click add. If you need to add more steps you are able to do that , and even if the step needs an authentication, go to the other tab. When you terminate it, click update/add the web monitoring.
Then you should check in Web scenarios, where you add the web scenario if there is any issue under Info column for that web scenario that you have add. If its well configurated you should not see anything in that column.
Then to receive notifications you should create triggers for that Web scenario.Comment
-
Still missing the information on how to test a web service and its output (either json or xml ...)
thanks anywayComment
-
https://www.zabbix.com/forum/zabbix-...json-response:
Preprocess JSON path https://www.zabbix.com/documentation..._preprocessing + you can use jq for debugging https://www.zabbix.org/wiki/Testing_Of_PreprocessingJSON Path Extract value or fragment from JSON data using a simple subset of JSONPath functionality.
Examples:
$.document.item.value will extract 10 from {"document":{"item":{"value": 10}}}
$.document.item will extract {"value": 10} from {"document":{"item":{"value": 10}}}
$['a document'].item.value will extract 10 from {"a document":{"item":{"value": 10}}}
$.document.items[1].value will extract 20 from {"document":{"items":[{"value": 10}, {"value": 20}]}}
Note that only direct paths to single objects in dot or bracket notation are supported.
Only alphanumeric + underscore characters can be used in JSONPath dot-notation ($.a.b.c). If the JSON object name contains other characters, then bracket-notation ($['a']['b']['c']) must be used. Both notations can be mixed ($.a['b'].c)
Extracting multiple values is not supported.
Supported since 3.4.0.XML XPath Extract value or fragment from XML data using XPath functionality.
For this option to work, Zabbix server must be compiled with libxml support.
Examples:
number(/document/item/value) will extract 10 from <document><item><value>10</value></item></document>
number(/document/item/@attribute) will extract 10 from <document><item attribute="10"></item></document>
/document/item will extract <item><value>10</value></item> from <document><item><value>10</value></item></document>
Note that namespaces are not supported.
Supported since 3.4.0.Comment
Comment