The problem of sending a ping status
-
rumarcin11
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: The problem of sending a ping status
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]
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]
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: The problem of sending a ping status
What command did you execute to generate this error?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: The problem of sending a ping status
I am guessing you do not have the syntax quite right. Here is an example:
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
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
In a service definition, this would likely be something like:
Code: Select all
check_ping!1000,5%!1500,10%
Last edited by eloyd on Wed Mar 09, 2016 9:44 am, edited 1 time in total.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
rumarcin11
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: The problem of sending a ping status
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
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
Could you please clarify this? I'm a bit confused on what you're asking.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
Former Nagios Employee
-
rumarcin11
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: The problem of sending a ping status
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"
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
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.
Former Nagios employee
-
rumarcin11
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: The problem of sending a ping status
I understand
Re: The problem of sending a ping status
Did you have any further questions, or are we good to mark this as resolved?
Former Nagios Employee
-
rumarcin11
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: The problem of sending a ping status
Already all work for me, as it should