Search code examples
restzabbix

Using Zabbix to monitor Restful call


I want to use Zabbix to make a Restful GET call periodically and check a return value.

For example I have a URL like https://mysite/api/performCheck. This endpoint returns JSON data that would look something like this:

{ "status": 0 }

If the status is 0 it indicates the site is performing as expected while none zero values would indicate an error code.

I would like Zabbix to make this restful call every 5 minutes and check that the value of "status" is 0. If the value is not zero I want Zabbix to send an alert.

How do I configure the Zabbix server with this type of robotic job?


Solution

  • Based on your example, you can simply setup a web scenario, that will search for the string "status : 0". Then you define your trigger, if pattern found, all is ok, else error.