Parsing Nagios Command Argument

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.
Locked
Pradeeps
Posts: 38
Joined: Thu Dec 22, 2016 11:05 am

Parsing Nagios Command Argument

Post by Pradeeps »

Folks,

I am trying to monitor the esxi server through SNMP. The existing setoup is monitoring the management IP address where am trying to add the check for iDRAC (Different IP from management). Below is the command I use,
$USER1$/check_snmp -m all -H $ARG1$ -C opennms-Priv -P 2c -o .1.3.6.1.4.1.674.10892.5.2.3.0 -s "ok(3)" -l "Overall Storage Status :"
Over there when I add the IP address to "ARG1", its making it global irrespective to the specific host.

For example, if am giving ARG1 as iDRAC IP of HOST-A, the same iDRAC IP is getting assigned for HOST-B, HOST-C...etc. what should I change to make it not global ?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Parsing Nagios Command Argument

Post by avandemore »

You'll want to use a host/service specific macro like $HOSTNAME$. See the following document:

https://assets.nagios.com/downloads/nag ... olist.html
Previous Nagios employee
Locked