Nagios Plugin Packet loss alert

Hi Guys,

If I use nagios plugin with fping checks, it gives me packet loss statistics, what service check alert, should I set to be notified that there are packet loss?

Hi Guys,

How I can trigger packet loss alert based on Fping nagios check
What service check condition I should use?

I would just use check_fping’s built in options to set your service’s status levels. See:

So for example, on your Service under Parameters you might put the options: -n 5 -c 30% -w 10%

That should fping the device 5 times and set the service status to WARNING if the packetloss is > 10% and CRITICAL if it’s >30%.

From there writing the alert rule is pretty easy.

The canned rules “Service warning” and “Service critical” from the rules collection should catch it. Or if you want the alert to be specific to the service you could do something like…

services.service_desc = the name of your service
services.service_status = 2

1 Like

So with services.service_status = 2 it will trigger the pager duty
what about warning? how can I make not to trigger the pager duty for warning?

By the way if I have a many fpings set on nagios plugin, and I want it to be alerted for all nagios checks, so I don’t put services.service_desc = the name of your service this one ?

Please see below, this is the service check I’m doing
I’m interested to setup two separate service check alerts
1,Service is down, in that case I use services.service_status != 0
2.Critical Packet loss, what should be in that case?

Yes, without the services.service_desc = condition it will trigger on all services.

services.service_status != 0 means that the alert would trigger on any status expect OK (0), so it will trigger on both WARNING or CRITICAL status which doesn’t sound like what you want.


-n5 -c100% -w30%

A services.service_status != 0 rule would trigger at 30% packet loss on the WARNING.

Using those settings, it sounds like it would make more sense for you to use services.service_status = 1 as your critical packet loss alert and services.service_status = 2 as your service down alert.

Got it, let me set it up , will test it

By The way, is there a way to control what alerts will be sent to Pager Duty? and what will be sent as email?

I don’t think that’s possible right now but I’ve seen it requested in the past so maybe someone will come up with something in the future.

I’ve never used PagerDuty, maybe you could filter out certain events on their end?

1 Like