Can we read http_check response and use it for -c/-w?
Posted: Tue Jul 25, 2017 5:23 pm
Hello There,
Could you please help me in following..
I am using check_http to get to know if the server is up or not.
This above code is working fine and I am getting emails if it is down.
But there are multiple services I want to monitor and I have following JSON data to monitor it.
Monitor1 and 2 has different alert and critical threshold values.
Can I use these values from HTTP response to decide the nagios critical or warning level.? Any help appreciated.
I was looking at this link https://support.nagios.com/forum/viewto ... =6&t=38108 but it is not returning any values. It throws error codes for the string matched.
How can I use the response data to decide the critical and warning values?
Could you please help me in following..
I am using check_http to get to know if the server is up or not.
Code: Select all
check_command check_http_url!/admin/v1/systemHealth/registeredModules/pulse!8080 -r \"isAlive\":\"false\" --invert-regex -l
This above code is working fine and I am getting emails if it is down.
But there are multiple services I want to monitor and I have following JSON data to monitor it.
Monitor1 and 2 has different alert and critical threshold values.
Can I use these values from HTTP response to decide the nagios critical or warning level.? Any help appreciated.
I was looking at this link https://support.nagios.com/forum/viewto ... =6&t=38108 but it is not returning any values. It throws error codes for the string matched.
How can I use the response data to decide the critical and warning values?
Code: Select all
{
"MONITOR1": {
"Obj1": [
{
"id": "1",
"monitor": "MONITOR1",
"key": "Service Response Time",
"value": 654,
"dateTime": "2017-07-24T22:00:45.503+0000",
"alertThresholdValue": 10000,
"criticalThresholdValue": 20000,
"serverName": "serverName1",
"isAlive": true
}
]
},
"MONITOR2": {
"Obj2": [
{
"id": "2",
"monitor": "MONITOR2",
"key": "Service Response Time",
"value": 6000,
"dateTime": "2017-07-24T22:00:45.503+0000",
"alertThresholdValue": 2500,
"criticalThresholdValue": 3000,
"serverName": "serverName2",
"isAlive": true
}
]
}
}