The problem of sending a ping status

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rumarcin11
Posts: 36
Joined: Thu Feb 25, 2016 7:42 am

Re: The problem of sending a ping status

Post 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]
User avatar
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

Post by Box293 »

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.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: The problem of sending a ping status

Post 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:

Code: Select all

check_ping!1000,5%!1500,10%
Assuming that you are using the stock check_ping command from commands.cfg
Last edited by eloyd on Wed Mar 09, 2016 9:44 am, edited 1 time in total.
Image
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

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The problem of sending a ping status

Post 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.
Former Nagios Employee
rumarcin11
Posts: 36
Joined: Thu Feb 25, 2016 7:42 am

Re: The problem of sending a ping status

Post 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"
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: The problem of sending a ping status

Post 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.
Former Nagios employee
rumarcin11
Posts: 36
Joined: Thu Feb 25, 2016 7:42 am

Re: The problem of sending a ping status

Post by rumarcin11 »

I understand
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The problem of sending a ping status

Post by rkennedy »

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

Post by rumarcin11 »

Already all work for me, as it should
Locked