Page 1 of 1

check_nwc_health Usage

Posted: Thu May 22, 2014 3:30 pm
by chethankrish
Hi All,

I am very new to Nagios and can somebody help me how to use check_nwc_health plugin. I have installed the same under "/usr/local/nagios/libexec".

I would have to use this to monitor uptime and few other parameters in Cisco Switch.

Thanks in Advance

Re: check_nwc_health Usage

Posted: Thu May 22, 2014 4:02 pm
by tmcdonald
You should be able to run

Code: Select all

/usr/local/nagios/libexec/check_nwc_health --help
for the plugin's help output.

Re: check_nwc_health Usage

Posted: Thu May 22, 2014 4:53 pm
by chethankrish
Hi,

I have run that, but i would like to know how to call this command as a service for the below host

define hostgroup{
hostgroup_name basefarm
alias Basefarm
}

define host{
use generic-switch
host_name OSL3-CORESWITCH
alias Juniper Core Switch in OSL3(ORK-OSL3-CORESW1)
address 192.168.1.1
hostgroups basefarm
}

Re: check_nwc_health Usage

Posted: Thu May 22, 2014 4:56 pm
by tmcdonald
I would read over our Nagios Core service monitoring help doc. It shouldn't be too different from configuring any other check.

Re: check_nwc_health Usage

Posted: Sun Jun 01, 2014 10:43 am
by chethankrish
tmcdonald wrote:I would read over our Nagios Core service monitoring help doc. It shouldn't be too different from configuring any other check.

Thanks for directing me to this. Can you please help me understand where are the variables( $USER1$, $ARG1$, $ARG2$, $ARG3$) defined in Nagios, for the below command ?

define command{
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}

Re: check_nwc_health Usage

Posted: Mon Jun 02, 2014 11:21 am
by tmcdonald
I think this recent post explains it well:

http://support.nagios.com/forum/viewtop ... 25#p100225
millisa wrote:These two pages of the documentation cover what you are asking:
Understanding Macros and How THey Work
Standard Macros in Nagios

Generally, the $USER#$ are defined in resources.cfg (at least that's where you'd normally put them). They are for things that are specific to your environment (USER1 typically is the location of your plugins). I like to put things in there like snmp community strings, an Identifier for this nagios system to use in the notification commands, and sometimes a user/password.

$ARG#$ are command argument macros - you set them in your service definition (the things you are trying to do checks for).