Hi,
Currently we are using check_icmp binary script to check host up and down status by passing argument as RTA and packet loss.
We need to pass RT min and packet loss as arguments and alert for host status. As check_icmp is the binary file we unable to make the changes in the file.
Could you please check and confirm if we can set alerting by passing RT min and packet loss as arguments. Could you please provide the "source-code" so we can modify as per our requirement.
Thanks & Regards,
Avinash Mane
Host ping check
Re: Host ping check
You can "set alerts" by specifying a warning and critical thresholds via the "-w" and "-c" flags. These are the defaults:
Examples:
Here's the check_icmp source code:
https://github.com/nagios-plugins/nagio ... eck_icmp.c
Let us know if you have any further questions. Thank you!
however, you can use whatever you want in your check.-w
warning threshold (currently 200.000ms,40%)
-c
critical threshold (currently 500.000ms,80%)
Examples:
Code: Select all
[root@main-nagios-xi libexec]# ./check_icmp -H nagios.com -w 200.000ms,40% -c 500.000ms,80%
OK - nagios.com: rta 37.884ms, lost 0%|rta=37.884ms;200.000;500.000;0; pl=0%;40;80;; rtmax=44.471ms;;;; rtmin=32.623ms;;;;
[root@main-nagios-xi libexec]# ./check_icmp -H nagios.com -w 20.000ms,40% -c 50.000ms,80%
WARNING - nagios.com: rta 39.556ms, lost 0%|rta=39.556ms;20.000;50.000;0; pl=0%;40;80;; rtmax=42.803ms;;;; rtmin=37.186ms;;;;
[root@main-nagios-xi libexec]# ./check_icmp -H nagios.com -w 10.000ms,40% -c 20.000ms,80%
CRITICAL - nagios.com: rta 46.105ms, lost 0%|rta=46.105ms;10.000;20.000;0; pl=0%;40;80;; rtmax=50.095ms;;;; rtmin=40.990ms;;;;https://github.com/nagios-plugins/nagio ... eck_icmp.c
Let us know if you have any further questions. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Host ping check
Thank you for update lmiltchev,
We unable to make the changes on given row source code.
Could you please provide the exact check_icmp script which we can modify as per requirement.
Thanks & Regards,
Avinash Mane
We unable to make the changes on given row source code.
Could you please provide the exact check_icmp script which we can modify as per requirement.
Thanks & Regards,
Avinash Mane
Re: Host ping check
I already provided you with the source code. It's a compiled plugin, so you cannot change it directly. You would need to modify the source code (the check_icmp.c file), then recompile Nagios plugins.Could you please provide the exact check_icmp script which we can modify as per requirement.
I still don't understand why you would need to modify the plugin itself. You can specify any warning and critical thresholds that you need, and be notified in case these thresholds are exceeded...
Modifying/rewriting plugins or developing new plugins is our of scope of Nagios support. You would need to do this on your own or contact our sales team, and request a quote for a custom development. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!