Page 1 of 1
check_icmp only warning
Posted: Tue Dec 12, 2023 9:32 am
by occ
HI
I would need the check_icmp, when it has 100% of RTA lost, to generate an alert warning instead of an alert critical.
I tried running:
check_icmp -H HOSTADDRESS -w 200.25,100% -c 200,25,101% but continues to generate a critical alert
Is there a way to disable critical?
Re: check_icmp only warning
Posted: Tue Dec 12, 2023 10:34 am
by swolf
Hi
@occ, thanks for reaching out.
Based on what I'm seeing, it looks like you never want a critical outcome - is that accurate?
Based on the performance data numbers from my own testing, it looks like check_icmp itself is clamping the packet loss numbers so that your critical threshold of 101% is interpreted as 100%.
If you never need a critical check result, my suggestion is to use the
negate plugin. The text of the check will still say "CRITICAL", but the check can be reinterpreted as a WARNING result.
Here's the check definition to reassign critical output to warning:
Code: Select all
/usr/local/nagios/libexec/negate -c WARNING /usr/local/nagios/libexec/check_icmp -H HOSTADDRESS -w '200.25,100%' -c '200.25,100%'
Hopefully that helps - let me know if you have any further questions or concerns.
Re: check_icmp only warning
Posted: Wed Dec 13, 2023 9:44 am
by occ
Thanks a lot!!