[Nagiosplug-help] Nagios Configuration with NRPE not working

Vincent K. Britton BrittonV at Wiznet.com
Thu Jul 26 16:13:41 CEST 2007


Christoph,

Thank you so much for pointing that out.  I feel like such an idiot for missing that.  

Sincerely,
Vince

-----Original Message-----
From: nagiosplug-help-bounces at lists.sourceforge.net [mailto:nagiosplug-help-bounces at lists.sourceforge.net] On Behalf Of Conzen, Christoph (C.)
Sent: Thursday, July 26, 2007 12:56 AM
To: Vincent K. Britton; nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] Nagios Configuration with NRPE not working

Hello Vincent,

from your config snipplets it might be a naming issue.

For all of the filenames you have as examples in you e-mail the ending is .cfg which is the default - but not for the host-configuration.
This has just got the name of you node you want to monitor. The rule to read in all files in a configuartion directory also require that the files in the directory have the ending .cfg
 
>From the documentation:
"
Object Configuration Directory	 
  
Format:	cfg_dir=<directory_name>	
   
Example:	cfg_dir=/usr/local/nagios/etc/commands
            cfg_dir=/usr/local/nagios/etc/services
            cfg_dir=/usr/local/nagios/etc/hosts 	 
This directive is used to specify a directory which contains object configuration files that Nagios should use for monitoring. All files in the directory with a .cfg extension are processed as object config files. Additionally, Nagios will recursively process all config files in subdirectories of the directory you specify here. You can seperate your configuration files into different directories and specify multiple cfg_dir= statements to have all config files in each directory processed. " 

Regards, Christoph

-----Ursprüngliche Nachricht-----
Von: nagiosplug-help-bounces at lists.sourceforge.net [mailto:nagiosplug-help-bounces at lists.sourceforge.net] Im Auftrag von Vincent K. Britton
Gesendet: Mittwoch, 25. Juli 2007 20:42
An: nagiosplug-help at lists.sourceforge.net
Betreff: [Nagiosplug-help] Nagios Configuration with NRPE not working

Greetings,

I am rolling out Nagios, and have installed NRPE but I can't get it to
work with Nagios.  I am using the book "NAGIOS System and Network
Monitoring".  The problems began when I added wizapp001

When I run # /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg I
get:
	Nagios 2.7
	Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
	Last Modified: 01-19-2007
	License: GPL

	Reading configuration data...

	Error: Could not find any host matching 'wizapp001'
	Error: Could not expand hostgroups and/or hosts specified in
service 	(config file
'/etc/nagios/mysite/linux/services/services.cfg', 	starting on line
16)
	
	***> One or more problems was encountered while processing the
config 	files...

     ...

I am at a complete loss as to how to troubleshoot this!  Please tell me
what I am doing wrong.  Here are my configuration files:

# more /etc/nagios/mysite/linux/services/services.cfg #ns2atl worked
fine
define service{
        host_name                       ns2atl
        service_description             check PING
        check_command                   check_ping!100.0,20%!500.0,60%
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        check_period                    24x7
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r,f
        contact_groups                  localadmins
}

# Here is where I added the new server
define service{
        host_name                       wizapp001
        service_description             FS_app
        check_command                   check_nrpe!check_disk_app
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        check_period                    24x7
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r,f
        contact_groups                  localadmins
}

# more /etc/nagios/mysite/linux/hosts/wizapp001
define host{
        host_name               wizapp001
        alias                   wizapp001
        address                 172.16.1.111
        check_command           check-host-alive
        max_check_attempts      3
        check_period            24x7
        contact_groups          localadmins
        notification_interval   120
        notification_period     24x7
        notification_options    d,u,r,f
}

# more /etc/nagios/mysite/commands.cfg
...
# Check remote servers
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

NRPE works find from the command line:
# /usr/local/src/nrpe-2.7.1/src/check_nrpe -H 172.16.1.111 -c
check_disk_app
DISK OK - free space: /app 17314 MB (61% inode=99%);|
/app=10710MB;29515;29520;0;29525


Thank you so much for any help you can offer!!!


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null




More information about the Help mailing list