Change OK to metric

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
coitop
Posts: 52
Joined: Fri Jul 17, 2020 7:35 am

Change OK to metric

Post by coitop »

Hello,

I would like to graph the availability of hosts in grafana. I would use the output of check_icmp or check_ping commands, but the return is "OK". Anyone knows how I can turn this "OK" in percentage? 100% for up and 0% for down so I can graph it?

Thank you
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Change OK to metric

Post by scottwilkerson »

check_ping should return performance data where the pl metric is what you are looking for, it shows the percent of packet loss
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
coitop
Posts: 52
Joined: Fri Jul 17, 2020 7:35 am

Re: Change OK to metric

Post by coitop »

scottwilkerson wrote:check_ping should return performance data where the pl metric is what you are looking for, it shows the percent of packet loss
Packet loss is not exactly availability. I understand what you say, but if I lose 1 ping out of 3, it is not unavailability, but it is packet loss. I want to graph the availability, not the pl that might occur if I lose 1 ping packet out of 3 or 5, which I test in every check.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Change OK to metric

Post by scottwilkerson »

coitop wrote:
scottwilkerson wrote:check_ping should return performance data where the pl metric is what you are looking for, it shows the percent of packet loss
Packet loss is not exactly availability. I understand what you say, but if I lose 1 ping out of 3, it is not unavailability, but it is packet loss. I want to graph the availability, not the pl that might occur if I lose 1 ping packet out of 3 or 5, which I test in every check.
How are you sending the data to Grafana?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart