check_http

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
deek
Posts: 194
Joined: Fri Apr 26, 2019 2:01 am

check_http

Post by deek »

Hi Team ,

We wanted to project the output of check_http into grafana and when we tried we were able to see the response time and size as shown in the screenshot below . But we wanted to have the error code displayed on Grafana something like 200 / 400 so on .
So is there any plugin to check http connection and get a status code / error code as output instead of response time .
Capture_url.PNG
You do not have the required permissions to view the files attached to this post.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: check_http

Post by gsmith »

Hi

I'm not sure how your nagios/grafana interface works, but you could use:

Code: Select all

[root@localhost libexec]# /usr/local/nagios/libexec/check_http -H google.com -f ok -I 142.250.191.238 -u "/" -S --sni -p 443             
HTTP OK: HTTP/1.1 301 Moved Permanently - 722 bytes in 0.104 second response time |time=0.103864s;;;0.000000 size=722B;;;0
If the interface doesn't do any data parsing you could write a script that calls out /usr/local/nagios/libexec/check_http
and passes in the parameters, then parse the output of /usr/local/nagios/libexec/check_http and return the modified
return data.

Thanks
Locked