Ok - I solved it. It was an Upper/Lower case thing. my variable IN USE needed
to be $_SERVICENAVOLUME$ instead of $_SERVICEnavolume$ because it automatically
converts the variable name to uppercase.
________________________________
From: Stringham, Steven [mailto:[email protected]]
Sent: Wednesday, June 29, 2011 12:19 PM
To: 'Nagios Users List'
Subject: [Nagios-users] Expanding Custom Variables
I am trying to monitor multiple volumes on a NetApp system. The format of the
command requires a hostname:volumename format. I want to reduce my
commands/service definitions to a minimum. My initial thought was to have a
generic service definition, that gets more specific with a sub definition.
When the command is run, it seems like it is not passing the custom variable,
but rather leaving a single $ behind where the variable ought to be.
Any ideas on
1) fixing my syntax?
2) Doing this somehow easier?
NAF UNKNOWN - No Snapmirror with source or destination "myhostname:$" found!
define service{
name NA_SnapMirror
check_command netapp_snapmirror
use GenericService_Core
normal_check_interval 1000
max_check_attempts 300
register 0
contact_groups CoreServers
}
define service {
use NA_SnapMirror
_navolume myvolumename
service_description SnapMirror_groups
hosts myhostname
}
define command{
command_name netapp_snapmirror
command_line $USER1$/check_naf.py -H $HOSTADDRESS$ -C $USER8$
snapmirror,$HOSTNAME$:$_SERVICEnavolume$,$USER25$
}
________________________________
For more information about Lewis and Roca LLP, please go to
www.lewisandroca.com<http://www.lewisandroca.com/>.
Phoenix (602)262-5311 Minden (775)586-9500
Tucson (520)622-2090 Albuquerque (505)764-5400
Las Vegas (702)949-8200 Silicon Valley (650)391-1380
Reno (775)823-2900
This message is intended only for the use of the individual or entity to
which it is addressed. If the reader of this message is not the intended
recipient, or the employee or agent responsible for delivering the message to
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately by replying
to the sender of this E-Mail by return E-Mail or by telephone.
In accordance with Internal Revenue Service Circular 230, we advise you that
if this email contains any tax advice, such tax advice was not intended or
written to be used, and it cannot be used, by any taxpayer for the purpose of
avoiding penalties that may be imposed on the taxpayer.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null