Hello,
i have installed the Nagios Monitoring system on RHEL 6.4. the remote host where i have insalled the NRPE plugin and addon,
now i want to add services Like ping,ssh,http,disk space in "/usr/local/nagios/etc/nrpe.cfg" please guide with exmple.
below mention current content of "/usr/local/nagios/etc/nrpe.cfg" file.
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
command[check_users]=/usr/local/nagios/libexec/check_ssh -w $ARG1$ -c $ARG2$
Please help me.
how to configure nrpe.cfg
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: how to configure nrpe.cfg
If you are looking to add custom plugins to your remote NRPE.cfg you can follow the command definitions that you just linked. Take one as an example and customize it for your new plugin. By the way, I just want to clarify that you only installed the NRPE agent on this host correct? You didn't install Nagios Core here? You only need an agent on a remote host to actively monitor it via NRPE, you do not need to install Core on it.
Re: how to configure nrpe.cfg
yes only i have installed the NRPE agent on remote host and im looking to add custom plugins to NRPE.cfg. If i want to add ping command definitions the file content like
" command[check_users]=/usr/local/nagios/libexec/check_ssh -w $ARG1$ -c $ARG2$" Please let me know what should be the $ARG1$ & $ARG2$.
I mean
$ARG1$ = ?????
$ARG2$ = ????
" command[check_users]=/usr/local/nagios/libexec/check_ssh -w $ARG1$ -c $ARG2$" Please let me know what should be the $ARG1$ & $ARG2$.
I mean
$ARG1$ = ?????
$ARG2$ = ????
Re: how to configure nrpe.cfg
Hi,
There ARG's you should set in your host.cfg at nagios server.
Here is my example:
In /etc/nagios/hosts/server.cfg I defined a service:
In /etc/nagios/objects/commands.cfg I defined the command check_nrpe:
In /etc/nagios/objects/commands.cfg I defined the command check_local_load:
On the remote host..
In /etc/nagios/nrpe.cfg I configured the check_load command:
Cheers.
There ARG's you should set in your host.cfg at nagios server.
Here is my example:
In /etc/nagios/hosts/server.cfg I defined a service:
Code: Select all
define service{
use generic-service
host_name server
service_description LOAD
check_command check_nrpe!check_local_load!5,6,7!8,9,10
}
Code: Select all
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
Code: Select all
define command{
command_name check_load
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
}
In /etc/nagios/nrpe.cfg I configured the check_load command:
Code: Select all
command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
Re: how to configure nrpe.cfg
My suggestions:
You can ignore the check_load service check config as that would only apply to local checks, *not* checks through nrpe.
Code: Select all
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
Code: Select all
define service{
use generic-service
host_name server
service_description LOAD
check_command check_nrpe!check_local_load!-w 5,6,7 -c 8,9,10
}
Code: Select all
command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.