Page 3 of 4
Re: The problem of sending a ping status
Posted: Tue Mar 08, 2016 6:05 pm
by rumarcin11
have problem:
check_ping: %s: Warning threshold must be integer or percentage!
-
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4|-6]
Re: The problem of sending a ping status
Posted: Tue Mar 08, 2016 7:29 pm
by Box293
What command did you execute to generate this error?
Re: The problem of sending a ping status
Posted: Tue Mar 08, 2016 10:08 pm
by eloyd
I am guessing you do not have the syntax quite right. Here is an example:
Code: Select all
/usr/local/nagios/libexec/check_ping -H 10.1.1.1 -w 1000,5% -c 1500,10%
PING OK - Packet loss = 0%, RTA = 0.43 ms|rta=0.425000ms;1000.000000;1500.000000;0.000000 pl=0%;5;10;0
Change 10.1.1.1 to be the appropriate IP address.
In a service definition, this would likely be something like:
Assuming that you are using the stock check_ping command from commands.cfg
Re: The problem of sending a ping status
Posted: Wed Mar 09, 2016 8:46 am
by rumarcin11
It works now

Now I have a question, whether it is an option, yes. that like a script Nagios will not work, then we can send the script does not work. And how Ping is the machine is turned on Nagios, but it does not work, that does not work Nagios
Re: The problem of sending a ping status
Posted: Wed Mar 09, 2016 10:41 am
by rkennedy
rumarcin11 wrote:It works now

Now I have a question, whether it is an option, yes. that like a script Nagios will not work, then we can send the script does not work. And how Ping is the machine is turned on Nagios, but it does not work, that does not work Nagios
Could you please clarify this? I'm a bit confused on what you're asking.
Re: The problem of sending a ping status
Posted: Wed Mar 09, 2016 4:55 pm
by rumarcin11
service nagios3 status | mail -s "Nadzios works" <address>
I wrote a short script to 7 am check the status of Nagios, and I would like to detect if something is wrong status Nagios "foul"
Re: The problem of sending a ping status
Posted: Thu Mar 10, 2016 12:55 pm
by tmcdonald
The method you describe should work, you just need to write a script that will understand the output of the service command. Running that on a cron every X minutes should be enough.
Re: The problem of sending a ping status
Posted: Fri Mar 11, 2016 2:57 am
by rumarcin11
I understand
Re: The problem of sending a ping status
Posted: Fri Mar 11, 2016 10:16 am
by rkennedy
Did you have any further questions, or are we good to mark this as resolved?
Re: The problem of sending a ping status
Posted: Wed Mar 16, 2016 5:24 am
by rumarcin11
Already all work for me, as it should