Nagios: Difference between revisions

Content added Content deleted
Line 116: Line 116:


== Configuration ==
== Configuration ==

On client to be monitored add the custom command:
;On client to be monitored

Add the custom command:
sudo nano /etc/nagios/nrpe.cfg
sudo nano /etc/nagios/nrpe.cfg
command[check_watchdog]=/usr/lib64/nagios/plugins/check_procs -c 1: -C 'python3.6' -a 'watchdog.py'
command[check_watchdog]=/usr/lib64/nagios/plugins/check_procs -c 1: -C 'python3.6' -a 'watchdog.py'
sudo systemctl restart nrpe

systemctl restart nrpe
;On Nagios Server:

Add a Custom Command
sudo nano /etc/nagios3/commands.cfg

<pre>
###############################################################################
# NRPE CHECK COMMAND
#
# Command to use NRPE to check remote host systems
###############################################################################

define command{
command_name check_nrpe_args
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
</pre>