LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2009, 03:31 AM   #16
nishith
Member
 
Registered: Aug 2008
Posts: 148

Original Poster
Rep: Reputation: 15
Smile


Dear Friend,

This is my Nagios Server Entry in command.cfg file
Path is :- /usr/local/nagios/etc/objects/commands.cfg


define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -n -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ $ARG3$
}


NRPE Installed Remote Client is having below entry.
Path is :- /usr/local/nagios/nrpe.cfg



command[check_disk]=/usr/local/nagios/libexec/check_disk -w 10m -c 2m -x /proc
#command[check_disk]=/usr/local/nagios/libexec/check_disk -c 10m -w 2m
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
#command[check_load]=/usr/local/nagios/libexec/check_load -c 15,10,5 -w 30,25,20
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30% -c 10%
#command[check_swap]=/usr/local/nagios/libexec/check_swap -c 30% -w 10%
command[check_procs]=/usr/local/nagios/libexec/check_procs -w 100 -c 200
#command[check_procs]=/usr/local/nagios/libexec/check_procs -c 100 -w 200
command[check_users]=/usr/local/nagios/libexec/check_users -w 20 -c 50
#command[check_users]=/usr/local/nagios/libexec/check_users -c 20 -w 50

Kindly let me know what to do now......


Regards,
Nishith Vyas
 
Old 07-12-2009, 04:07 PM   #17
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by nishith View Post
Dear Friend,

This is my Nagios Server Entry in command.cfg file
Path is :- /usr/local/nagios/etc/objects/commands.cfg


define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -n -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ $ARG3$
}


NRPE Installed Remote Client is having below entry.
Path is :- /usr/local/nagios/nrpe.cfg



command[check_disk]=/usr/local/nagios/libexec/check_disk -w 10m -c 2m -x /proc
#command[check_disk]=/usr/local/nagios/libexec/check_disk -c 10m -w 2m
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
#command[check_load]=/usr/local/nagios/libexec/check_load -c 15,10,5 -w 30,25,20
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30% -c 10%
#command[check_swap]=/usr/local/nagios/libexec/check_swap -c 30% -w 10%
command[check_procs]=/usr/local/nagios/libexec/check_procs -w 100 -c 200
#command[check_procs]=/usr/local/nagios/libexec/check_procs -c 100 -w 200
command[check_users]=/usr/local/nagios/libexec/check_users -w 20 -c 50
#command[check_users]=/usr/local/nagios/libexec/check_users -c 20 -w 50

Kindly let me know what to do now......


Regards,
Nishith Vyas

the number of arguments etc depends on what this check is actually doing.


this is how i check memory.

in commands.cfg

command + 3 args

Code:
define command{
      command_name    check_nrpe
      command_line    $USER1$/check_nrpe -n -H $HOSTADDRESS$ -t 20 -c $ARG1$ -a $ARG2$ $ARG3$
}
check command in my services.cfg file

command + 3 args. if i ran this on the command line it would be
./check_nrpe -n -H hostname -c check_mem -a 65 70. - this would connect to the remote server and return results.

Code:
check_nrpe!check_mem!65!70

and finally on the local host,


command + 2 args

Code:
command[check_mem]=/usr/local/nagios/libexec/check_mem -w $ARG1$ -c $ARG2$

the arguments in the services.cfg has to match the commands.cfg.

or you can just hard code the args into commands.cfg like -

Code:
define command{
      command_name    check_nrpe
      command_line    $USER1$/check_nrpe -n -H host -t 20 -c check_mem -a 70 80
}

I have given up trying to explain now.......sorry, i think it is time for you to read the documentation.
It is exactly what i had to do to get it all going
 
  


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
How to use Nagios plugin? dwarf007 Linux - Software 20 10-03-2011 07:11 AM
nagios plugin check_url_status vanderbult Linux - Software 2 05-14-2009 11:36 AM
Nagios Plugin fullgore *BSD 3 10-22-2008 09:52 AM
Nagios Plugin Compile Anarusis Linux - Software 3 04-10-2005 03:31 PM
Returned mail: Can't create output: Operation not permitted turbo_acura Linux - General 0 10-19-2004 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration