Unable to solve problem

Andreas Ericsson ae at op5.se
Mon Feb 20 10:13:11 CET 2012


On 02/16/2012 05:34 PM, Curtis E. Hutson wrote:
> I have been working this problem for a few days now.  I have read a number of forums and other posts from others who have had the same problem but can not get this working.
> 
> Using Nagios Core 3.3.1 runing on CentOS 6.2
> 
> 
> Attempting to monitor a windows server and get counter information on pagefile usage, once solved I will add other commands just need to understand the basics.
> 
> Receive this error
> 
> Checking services...
> Error: Service check command 'check_nt -H onc01 -p 12489 -v COUNTER -l "\\Paging File(_Total)\\%% Usage","Paging file usage is %.2f %%" -w 80 -c 90' specified in service 'Pagefile' for host 'onc01' not defined anywhere!
> 
> 
>> From a file called hosts-others.cfg  where I define my host
> 
> 
> define host {
>          use             generic-host            ;Template Used
>          host_name      onc01
>          alias         onc01
>          address         192.168.XXX.XXX
>          check_command   check-host-alive
>          max_check_attempts      10
>          notification_interval   120
>          notification_period     24x7
>          contact_groups          admins
>          notification_options    d,r
>          }
> 
> 
>> From  command.cfg
> 
> define command{
>          command_name    check_pagefile
>          command_line    $USER1$/check_nt -H onc01 -p 12489 -v COUNTER -l "\\Paging File(_Total)\\%% Usage","Paging file usage is %.2f %%" -w 80 -c 90'
>          }
> 

Change this command_line to:
   $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 (insert rest of line here)

> 
> define service{
>          use                     generic-service
>          host_name               onc01
>          service_description     Pagefile
>          check_command           check_nt -H onc01 -p 12489 -v COUNTER -l "\\Paging File(_Total)\\%% Usage","Paging file usage is %.2f %%" -w 80 -c 90
>          }
> 

Change check_command in the service definition to:
    check_pagefile

and you're done.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
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