LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 03-18-2008, 01:04 AM   #1
bhagya
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Rep: Reputation: 0
Nrpe configuration


i have an error faced while configuring the nrpe

Reading configuration data...

Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service '/dev/hda1 Free Space' on host 'remotehost'
Error: Could not register service (config file '/usr/local/nagios/etc/services.cfg', starting on line 56)

***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.


the defination of services.cfg.

# Service definition
define service{
# Name of service template to use
use generic-service
host_name loc
service_description PING
is_volatile 0
check_period alltime
max_check_attempts 5
normal_check_interval 5
retry_check_interval 1
contact_groups nagios
notification_interval 960
notification_period alltime
notification_options w,u,c,r
check_command check_ping!100.0,20%!500.0,60%


active_checks_enabled 1 ;
passive_checks_enabled 1 ;
parallelize_check 1 ;
obsess_over_service 1 ;

obsess_over_service 1 ;
check_freshness 0 ;
notifications_enabled 1 ;
event_handler_enabled 1 ;
flap_detection_enabled 1 ;
failure_prediction_enabled 1 ;
process_perf_data 1 ;
retain_status_information 1 ;
retain_nonstatus_information 1 ;
register 0 ;
}


define service{
use generic-service
host_name remotehost
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name remotehost
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name remotehost
service_description /dev/hda1 Free Space
check_period alltime
check_command check_nrpe!check_hda1
}
define service{
use generic-service
host_name remotehost
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name remotehost
service_description Zombie Processes
check_command check_nrpe!check_zombie_procs
}
define service{
use local-service
host_name remotehost
service_description Swap Usage
check_command check_nrpe!check_swap
}
 
Old 03-18-2008, 07:17 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
The error message says it all you need to set proper values for
Code:
max_attempts, check_interval, retry_interval, notification_interval
 
Old 03-18-2008, 07:30 AM   #3
bhagya
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Unhappy

could you give some examples
 
Old 03-18-2008, 08:03 AM   #4
livetoday
Member
 
Registered: Jun 2006
Location: India
Distribution: RHEL,Suse,Fedora
Posts: 106

Rep: Reputation: 15
Code:
define service{
use generic-service
host_name remotehost
service_description /dev/hda1 Free Space
check_period alltime
check_command check_nrpe!check_hda1
I don't know much about nagios, but I think in the service description part of the above service definition could be the culpirit. Try to keep '/dev/hda' in single quotes or use a string without '/'.
 
Old 03-18-2008, 11:21 PM   #5
bhagya
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Original Poster
Rep: Reputation: 0
this didnot work. any other solution
 
Old 04-02-2009, 03:58 PM   #6
haran005
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
check_nrpe check_hda1

define service{
use generic-service
host_name remotehost
service_description /dev/hda1 Free Space
check_period alltime
check_command check_nrpe!check_hda1
}

This doesn't seem to work on ubuntu machine

Tried the command from Nagios host

$ /usr/lib/nagios/plugins/check_nrpe -H devlamp01 -c check_hda1

And I get the result

DISK CRITICAL - /dev/hda1 is not accessible: No such file or directory


From the client side, there is no /dev/hda1 folder in ubuntu.
 
Old 04-02-2009, 06:49 PM   #7
tanvir1
LQ Newbie
 
Registered: Apr 2009
Location: Canberra, Australia
Distribution: OpenBSD, Redhat, OpenSUSE
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by bhagya View Post
i have an error faced while configuring the nrpe
Not a direct answer to your question but I found it's better to use SNMP over NRPE. I used to use NRPE years ago & then switched SNMP. SNMP comes with more Linux distros; so you don't need to worry about installing just another extra package (NRPE). It's also easy to configure (as far as Nagios is concerned).

Here's copy of my snmpd.conf on client machines (it is used to check disk space, total processes, specific system processes, SNMP uptime & various other things)

Code:
rwcommunity @dwrp 127.0.0.1
rocommunity @dwrp 127.0.0.1
rocommunity @dwrp <IP_of_nagios_server>
syscontact <user@email.com>
syslocation <system's location>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios + nrpe configuration aeby Linux - Server 6 05-29-2012 12:52 PM
Nagios--- NRPE lazylark Linux - Software 1 04-11-2007 02:57 PM
nrpe installation and configuration via proxy? Mangenius Linux - Software 36 02-12-2007 01:21 PM
Nagios - nrpe plugin configuration nitin-saxena Linux - Software 1 10-27-2006 02:50 PM
Nagios NRPE twantrd Linux - Software 1 10-20-2004 09:24 AM


All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration