help

Marc Powell mpowell at ena.com
Tue Nov 11 21:48:32 CET 2003


Check_nt.c is an uncompiled program and is not executable and therefore
will not work. I am assuming that you downloaded the nsclient program
from TSMG Software. They provide a linux binary in the zip file
(/LinuxBin/check_nt) and the .c file you found along with a readme on
what to do what that. If you opt for their precompiled version, copy it
to ~nagios/libexec and try again.

--
Marc

> -----Original Message-----
> From: Mike Grome [mailto:mgrome at techmergency.com]
> Sent: Tuesday, November 11, 2003 10:55 AM
> To: Marc Powell
> Cc: nagios-users at lists.sourceforge.net
> 
> OK, This is a new install of Nagios 1.1 and I am a Nagios Newbie as
> well.  The
> Link you provided below was very helpful and I am no longer getting
any
> errors when I restart Nagios.  I am however getting an error when
> attempting to monitor a local NT machine.......error = (Return code of
> 126 is out of bounds - plugin may be missing) Here is the service and
> command definition.  this has been installed on RedHat 9.0 and have
> installed NSClient 2.0 on NT machine, and copied the check_nt.c file
> into the ..../libexec/ directory.
> 
> # Service definition
> define service{
> 	use				generic-service		; Name
> of service template to use
> 
> 	host_name			"hostname"
> 	service_description		C: Free Space
> 	is_volatile			0
> 	check_period			24x7
> 	max_check_attempts		3
> 	normal_check_interval		5
> 	retry_check_interval		1
> 	contact_groups			admins
> 	notification_interval		120
> 	notification_period		24x7
> 	notification_options		w,u,c,r
> 	check_command			check_nt_disk!20%!10%!c:
> 	}
> 
> # 'check_nt_disk' command definition
> define command{
> 	command_name	check_nt_disk
> 	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
> USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
> 	}
> 
> 
> Thanks for the help!!!!!!!!!!!!!!!!!!!!!!
> 
> -----Original Message-----
> From: Marc Powell [mailto:mpowell at ena.com]
> Sent: Thursday, October 30, 2003 9:34 AM
> To: Mike Grome
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] help
> 
> Well, let's start with the basics since we don't have them. Is this a
> new installation of nagios or are you just new to using it? If it's a
> new installation of nagios, unless you specifically ran ./configure
with
> the --with-default-objects option then you're using the wrong command
> format since nagios actually defaults to the template-based object
> definitions (see
> http://nagios.sourceforge.net/docs/1_0/configobject.html) which is
much
> more flexible.
> 
> Second, what is the exact error that's being reported? With the
> exception of Microsoft products, the actual error message is often
> central to determining what the problem is with any program.
> 
> Third, what versions of nagios and plugins are you using and how were
> they installed (tar.gz, rpm, deb or other method)? What operating
system
> is it running under and is there anything that you would consider
> 'special' about your installation? What configure options were used
when
> building the program (if you know).
> 
> Lastly, please provide the host definition and service definition for
at
> least one host that uses the check_nt_disk command below.
> 
> --
> Marc
> 
> > -----Original Message-----
> > From: Mike Grome [mailto:mgrome at techmergency.com]
> > Sent: Wednesday, October 29, 2003 7:12 PM
> > To: Marc Powell
> >
> > Sorry.  I should have included more information, so here it is.
Hope
> > you can help this newbie.
> > After installing NSClient and following the instructions
> > per..................
> >
> > On the Unix machine
> > 1.	Copy the file 'check_nt' under the libexec folder of Nagios.
> > 2.	Add the following lines to the commands.cfg file:
> > -------------------- I have actually put this in the
> "checkcommands.cfg"
> > file.
> >
> >
> > # NSClient basic return types
> >
> > command[check_nt_disk]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
> > USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
> > command[check_nt_cpuload]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > CPULOAD -l $ARG1$
> > command[check_nt_uptime]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > UPTIME
> > command[check_nt_clientversion]=$USER1$/check_nt -H $HOSTADDRESS$ -p
> > 1248 -v CLIENTVERSION
> > command[check_nt_process]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > PROCSTATE -l $ARG1$
> > command[check_nt_service]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > SERVICESTATE -l $ARG1$
> > command[check_nt_memuse]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > MEMUSE -w $ARG1$ -c $ARG2$
> > command[check_nt_fileage]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > FILEAGE -l $ARG1$ -w $ARG2$ -c $ARG3$
> > # Custom counters (one per required counter, or define a generic one
> and
> > use $ARG1$ to specify the requested counter).
> >
> > command[check_nt_pagingfile]=$USER1$/check_nt -H $HOSTADDRESS$ -p
1248
> > -v COUNTER -l "\\Paging File(_Total)\\%% Usage","Paging File usage
is
> > %.2f %%" -w $ARG1$ -c $ARG2$
> >
> >
> > I get an error when I try to restart nagios that points to the very
> > first line above (1st line not commented out)
> > I am trying to use NSClient to monitor remote/local NT machines.  Is
> > this the proper plug in to use or should I be looking at something
> else
> > entirely?
> > Thanks for the assistance!!!!!!!!!
> >
> > -----Original Message-----
> > From: Marc Powell [mailto:mpowell at ena.com]
> > Sent: Wednesday, October 29, 2003 1:57 PM
> > To: Mike Grome
> > Subject: RE: [Nagios-users] help
> >
> > $USER1$ is a defined macro in resource.cfg. You shouldn't need to
> > replace it if you haven't changed its definition in resource.cfg ala
> >
> > # Sets $USER1$ to be the path to the plugins
> > $USER1$=/usr/local/nagios/libexec
> >
> > --
> > Marc
> >
> > > -----Original Message-----
> > > From: Mike Grome [mailto:mgrome at techmergency.com]
> > > Sent: Wednesday, October 29, 2003 1:43 PM
> > > To: Marc Powell
> > >
> > > This is going to sound stupid but I was actually looking for what
to
> > put
> > > where it says $USER$.   I know I can use the ip address at
> $HOSTNAME$
> > but
> > > not sure what I need here.
> > >
> > > -----Original Message-----
> > > From: Marc Powell [mailto:mpowell at ena.com]
> > > Sent: Wednesday, October 29, 2003 1:30 PM
> > > To: Mike Grome; nagios-users at lists.sourceforge.net
> > > Subject: RE: [Nagios-users] help
> > >
> > >
> > >
> > > ________________________________________
> > > From: Mike Grome [mailto:mgrome at techmergency.com]
> > > Sent: Wednesday, October 29, 2003 12:49 PM
> > > To: nagios-users at lists.sourceforge.net
> > >
> > >
> > > Can someone help me with the following syntax, possibly with an
> > example??
> > > I am stuck.
> > >
> > >
> > >
> > > command[check_nt_disk]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248
-v
> > > USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
> > >
> > >
> > > This looks like it will work if your service definition looks like
> --
> > >
> > > check_nt_disk!C!90!95
> > >
> > > That will warn if C: is 90% and critical if it's 95%. Some more
> > > information on what problem you are having exactly and the
relevant
> > config
> > > information would be useful.
> > >
> > > --
> > > Marc


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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





More information about the Users mailing list