Hi!
First time poster here, not that experienced with Zabbix. I'm currently working in a project to migrate from Shinken/Nagios to Zabbix 4.2.
I'm monitoring some applications with a health check page returning health status of application and also showing dependencies. I have tried to get both the health status and the message from the page to show up in the same item or trigger to no avail.
The item I created is an HTTP agent check and the format of the health check page looks like this:
What I would like to do is to at least be able to monitor the Health status of main app ($.isHealthy) and in the same time publish the content of $.message.
When I create an item that reads the output from the health check and add a preprocessor to it any subsequent preprocessor inherits the output of the previous preprocessor so I can't extract more than one key, value pair that way.
Is it possible to create macros based on different part of the json so I could use them when describing the problem in a trigger?
I have googled around but not found anything substantial only to use external scripts or userchecks which I will do if there's no way to extract multiple fields from the json into the item or a trigger.
First time poster here, not that experienced with Zabbix. I'm currently working in a project to migrate from Shinken/Nagios to Zabbix 4.2.
I'm monitoring some applications with a health check page returning health status of application and also showing dependencies. I have tried to get both the health status and the message from the page to show up in the same item or trigger to no avail.
The item I created is an HTTP agent check and the format of the health check page looks like this:
Code:
{
"dependencies": [
{
"isHealthy": true,
"message": "App1 is connected and configured correctly",
"name": "App1 name"
},
{
"isHealthy": false,
"message": "App2 is b0rked",
"name": "App2"
},
{
"isHealthy": true,
"message": "App3 is connected and configured correctly",
"name": "App3"
},
{
"isHealthy": false,
"message": "App4 doesn't like your code",
"name": "App4 name"
}
],
"isHealthy": false,
"message": "App2 and App4 failed",
"name": "MainApp",
"version": "1.1.4-prod"
}
When I create an item that reads the output from the health check and add a preprocessor to it any subsequent preprocessor inherits the output of the previous preprocessor so I can't extract more than one key, value pair that way.
Is it possible to create macros based on different part of the json so I could use them when describing the problem in a trigger?
I have googled around but not found anything substantial only to use external scripts or userchecks which I will do if there's no way to extract multiple fields from the json into the item or a trigger.
Comment