check_nt configuration
Mark.Law at thomson.com
Mark.Law at thomson.com
Tue Sep 6 18:29:54 CEST 2005
Can someone explain why the first definition fails and the second
succeeds? I should note that the first definition only fails if the
"service name" has spaces in it.
define command{
command_name check_nc_net_with_l_d
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v $ARG1$ -l
"service name"
}
define command{
command_name check_nc_net_with_l_d
command_line $USER1$/check_nt -H hostname -p 1248 -v $ARG1$ -l "service
name"
}
________________________________
From: Anthony Montibello [mailto:amontibello at gmail.com]
Sent: Saturday, September 03, 2005 4:42 AM
To: Law, Mark (TSH Center); Nagios Users List
Subject: Re: [Nagios-users] check_nt configuration
I know the following works for NC_Net but I am not sure if it works for
ns_client but I assume it should.
add the " on the command definition again,
command_line /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v
SERVICESTATE -d SHOWALL -l "$ARG1$"
because the check_command is delimited by the ! and can have spaces in
it without the " thus:
check_command check_nt!HUMMINGBIRD STR SERVICE
I use the following in my config
check_command
check_nc_net_with_l_d!SERVICESTATE!MSSQL\$BKUPEXEC,Backup Exec Job
Engine,Backup Exec Server!SHOWALL
define command{
command_name check_nc_net_with_l_d
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v $ARG1$ -l
"$ARG2$" -d $ARG3$
}
I hope this helps
Tony
amontibello at shatterit.com
On 9/2/05, Mark.Law at thomson.com <Mark.Law at thomson.com> wrote:
I have a different problem with check_nt.
>From the command line:
/usr/lib/nagios/plugins/check_nt -H servername -p 1248 -v
SERVICESTATE -d SHOWALL -l "HUMMINGBIRD STR SERVICE"
works great and returns:
HUMMINGBIRD STR SERVICE: Started
just like it is supposed to do. However, when run from nagios it says:
HUMMINGBIRD STR SERVICE: Unknown
The check_nt command definition has been modified like this:
command_line /usr/lib/nagios/plugins/check_nt -H
$HOSTADDRESS$ -v SERVICESTATE -d SHOWALL -l $ARG1$
I removed the quotes from around $ARG1$ so that multiple services could
be checked by passing with embedded quotes, like "server","service with
space in the name", etc.
This works great on one server running nagios but not the other. I have
check and re-checked paths, permissions, check_nt versions and am
stumped.
Any help out there?
Thanks,
Mark
________________________________
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net ] On Behalf Of Jon
Sent: Thursday, August 25, 2005 2:46 PM
To: Nagios-Users
Subject: RE: [Nagios-users] check_nt configuration
Hi,
Since you mentioned that you have installed the plugins in a different
location, did you make change to the $USER1$ variable to point it to the
correct location? To set the variable $USER1$ to
/usr/lib/nagios/plugins/ you need to edit the resource.cfg.
You can also try executing the command to see if it actually works.
Just go to where the check_nt is located and run it. That would
eliminate a few things.
HTH,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050906/e916297e/attachment.html>
More information about the Users
mailing list