configure monitoring ping using wizard?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

configure monitoring ping using wizard?

Post by ikekim »

Hi,

I'm using the Nagios XI configuration wizard and want to monitor "ping" for targeted, but I don't see this as a part of the selection from the wizard.

I see an option for "monitor a web site" so I used that option to walk through the wizard to configure the monitoring for http.

Then I use the Core Config Manager, go to services, find the http service object, make a copy, and edit and select the check command "check_ping" from the drop box and I see this in the command view "$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5", but I don't know how to use the parameters and the arguements.

I'm sure how use the commands instructions should be online help, but I can't locate them.

Is there a URL that lists all commands and how to use instructions and examples?

thanks,
ik
kyang

Re: configure monitoring ping using wizard?

Post by kyang »

A pretty good place to find help is on the plugin itself through the command-line. (--help works with any Nagios plugin)

Code: Select all

/usr/local/nagios/libexec/check_ping --help
This is the output.

Code: Select all

[root@centos7x64 etc]# /usr/local/nagios/libexec/check_ping --help
check_ping v2.2.1.git (nagios-plugins 2.2.1)
Copyright (c) 1999 Ethan Galstad <[email protected]>
Copyright (c) 2000-2014 Nagios Plugin Development Team
        <[email protected]>

Use ping to check connection statistics for a remote host.

Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]

Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 --extra-opts=[section][@file]
    Read options from an ini file. See
    https://www.nagios-plugins.org/doc/extra-opts.html
    for usage and examples.
 -4, --use-ipv4
    Use IPv4 connection
 -6, --use-ipv6
    Use IPv6 connection
 -H, --hostname=HOST
    host to ping
 -w, --warning=THRESHOLD
    warning threshold pair
 -c, --critical=THRESHOLD
    critical threshold pair
 -p, --packets=INTEGER
    number of ICMP ECHO packets to send (Default: 5)
 -L, --link
    show HTML in the plugin output (obsoleted by urlize)
 -t, --timeout=INTEGER:<timeout state>
    Seconds before connection times out (default: 10)
    Optional ":<timeout state>" can be a state integer (0,1,2,3) or a state STRING

THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel
time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the
percentage of packet loss to trigger an alarm state.

This plugin uses the ping command to probe the specified host for packet loss
(percentage) and round trip average (milliseconds). It can produce HTML output
linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in
the contrib area of the downloads section at http://www.nagios.org/

Send email to [email protected] if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
[email protected]
Another alternative is the man pages for Nagios-plugins.org
http://nagios-plugins.org/doc/man/index.html

You can also find our updated plugins on our GitHub.
https://github.com/nagios-plugins/nagios-plugins

Hope this helps.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: configure monitoring ping using wizard?

Post by ikekim »

Thanks for the response.

However, I wish these have some examples because I'm not sure what these mean. What type of value do I use for THRESHOLD?

-w, --warning=THRESHOLD
warning threshold pair
-c, --critical=THRESHOLD
critical threshold pair

thanks,
ik
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: configure monitoring ping using wizard?

Post by ikekim »

Not sure how to set the values..

[root@null-0800270406a2 ~]# /usr/local/nagios/libexec/check_ping -H 10.155.58.26 -w 100
<crta> was not set
check_ping: Could not parse arguments
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4|-6]



thanks,
ik
kyang

Re: configure monitoring ping using wizard?

Post by kyang »

Code: Select all

THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel
time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the
percentage of packet loss to trigger an alarm state.
An example,

Code: Select all

/usr/local/nagios/libexec/check_ping -H 10.155.58.26 -w 5,40% -c 10,50% -p 5
<rta> = this is the round trip time from nagios to client and back to nagios

check_ping -w <rta>,<pl%> -c <rta>,<pl%>
Depends on when you want to receive alerts for warnings and criticals.

Does this help?
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: configure monitoring ping using wizard?

Post by ikekim »

Yes this definitely helps - here is what I found:

This works: /usr/local/nagios/libexec/check_ping -H 10.155.58.26 -w 5,40% -c 10,50%

This doesn't work: /usr/local/nagios/libexec/check_ping -H 10.155.58.26 -w 5,40%
Error message:
<crta> was not set
check_ping: Could not parse arguments
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4|-6]

Therefore, it looks like I need the "-c 10,50%", but the instructions are not explicit, at least for me...wasn't sure what <crta> was or how to set it not until I saw your example.

Is there a way for me to run this command with all default values as if I'm just executing a ping command from any linux command line?


thanks,
ik
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: configure monitoring ping using wizard?

Post by dwhitfield »

ikekim wrote: Is there a way for me to run this command with all default values as if I'm just executing a ping command from any linux command line?
Could you clarify what you mean by the above? The ping command in Linux doesn't have warnings and criticals, so I am not sure what you are going to get by just running ping.

Are you just wanting to be able to run check_pingfrom the command line? You'll need to put it in your path and create an alias, but that could be dangerous, as if you need to change warnings and criticals in the future you'll need to change the alias.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: configure monitoring ping using wizard?

Post by ikekim »

I'm normally configure monitoring using the Nagios XI configuration wizard.
There is no selection for me to choose just the ping configuration(there is for web URL).
When the config wizard is used to select the type of monitoring like NRPE or Web URL, I see that all the command are created with default parameters in the settings.

So, how I create the ping check so that this appears on my monitoring console display?

thanks,
ik
kyang

Re: configure monitoring ping using wizard?

Post by kyang »

You can create a new ping check by going to
Home --> Configure --> Core Config Manager --> Services --> Select your host --> Add new --> Select check command for check_ping --> Pass your $ARG1$ and $ARG2$.

Dont' forget to assign the new service a template and host.

Hope this helps.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: configure monitoring ping using wizard?

Post by ikekim »

Okay, but this is brand new deployment and I have no hosts added.

Your instructions are based on if I had an existing host.

So I tried to add host using the CCM and I chose Select check command for check_ping --> Pass your $ARG1$ and $ARG2$, then when I apply the config, it gave me an error it could not apply and rolled back.

I just want to add bunch of machines and ping them....can I just add host using CCM and select the check_ping?

Not sure the difference when you should be adding a host vs. adding a service.


thanks
ik
Locked