I have recently installed Nagios on a Centos 8 VM following the instructions here: https://www.linuxtechi.com/install-nagi ... -centos-8/
Fired it up and sure enough - monitoring localhost perfectly.
Feeling adventurous (always a bad sign) I tried them to set up monitoring of an Ubuntu 20 machine on the same network. I used the article (by the same author) located here: https://www.linuxtechi.com/add-windows- ... ios-server (Linux instructions start about half way down the page).
And this is where I hit a snag.
In nagios.cfg I uncommented the following
Code: Select all
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
Code: Select all
define host{
use linux-server
host_name pfs-do-m01
alias pfs-do-m01
address 192.168.0.128
}
define hostgroup{
hostgroup_name linux-server
alias Linux Servers
members pfs-do-m01
}
define service{
use local-service
host_name pfs-do-m01
service_description Ping
check_command check_nrpe!check_ping
}
define service{
use local-service
host_name pfs-do-m01
service_description SWAP Usage
check_command check_nrpe!check_swap
}
define service{
use local-service
host_name pfs-do-m01
service_description Root / Partition
check_command check_nrpe!check_root
}
define service{
use local-service
host_name pfs-do-m01
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use local-service
host_name pfs-do-m01
service_description Total Processes
check_command check_nrpe!check_total_procs
}
define service{
use local-service
host_name pfs-do-m01
service_description Current Load
check_command check_nrpe!check_load
}
The messages chopped of the end of the image read:
Code: Select all
NRPE: Command 'check_ping' not defined
NRPE: Command 'check_root' not defined
NRPE: Command 'check_swap' not defined
I'm guessing that for some reason check_nrpe has some incompatibility with other commands in /usr/local/nagios/libexec, the contents of which are here:
Code: Select all
-rwxr-xr-x. 1 nagios nagiosxi 215632 Aug 12 10:10 check_apt
-rwxr-xr-x. 1 nagios nagiosxi 2346 Aug 12 10:10 check_breeze
-rwxr-xr-x. 1 nagios nagiosxi 221728 Aug 12 10:10 check_by_ssh
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_clamd -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 162560 Aug 12 10:10 check_cluster
-r-sr-xr-x. 1 root nagiosxi 218688 Aug 12 10:10 check_dhcp
-rwxr-xr-x. 1 nagios nagiosxi 213512 Aug 12 10:10 check_dig
-rwxr-xr-x. 1 nagios nagiosxi 375896 Aug 12 10:10 check_disk
-rwxr-xr-x. 1 nagios nagiosxi 10134 Aug 12 10:10 check_disk_smb
-rwxr-xr-x. 1 nagios nagiosxi 236800 Aug 12 10:10 check_dns
-rwxr-xr-x. 1 nagios nagiosxi 113168 Aug 12 10:10 check_dummy
-rwxr-xr-x. 1 nagios nagiosxi 5066 Aug 12 10:10 check_file_age
-rwxr-xr-x. 1 nagios nagiosxi 6504 Aug 12 10:10 check_flexlm
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_ftp -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 215056 Aug 12 10:10 check_hpjd
-rwxr-xr-x. 1 nagios nagiosxi 355496 Aug 12 10:10 check_http
-r-sr-xr-x. 1 root nagiosxi 256696 Aug 12 10:10 check_icmp
-rwxr-xr-x. 1 nagios nagiosxi 170856 Aug 12 10:10 check_ide_smart
-rwxr-xr-x. 1 nagios nagiosxi 15275 Aug 12 10:10 check_ifoperstatus
-rwxr-xr-x. 1 nagios nagiosxi 13422 Aug 12 10:10 check_ifstatus
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_imap -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 6985 Aug 12 10:10 check_ircd
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_jabber -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 205216 Aug 12 10:10 check_load
-rwxr-xr-x. 1 nagios nagiosxi 7068 Aug 12 10:10 check_log
-rwxr-xr-x. 1 nagios nagiosxi 25575 Aug 12 10:10 check_mailq
-rwxr-xr-x. 1 nagios nagiosxi 166808 Aug 12 10:10 check_mrtg
-rwxr-xr-x. 1 nagios nagiosxi 169640 Aug 12 10:10 check_mrtgtraf
-rwxr-xr-x. 1 nagios nagiosxi 188192 Aug 12 10:10 check_nagios
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_nntp -> check_tcp
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_nntps -> check_tcp
-rwxr-xr-x. 1 root root 55488 Aug 12 11:17 check_nrpe
-rwxr-xr-x. 1 nagios nagiosxi 224144 Aug 12 10:10 check_nt
-rwxr-xr-x. 1 nagios nagiosxi 227752 Aug 12 10:10 check_ntp
-rwxr-xr-x. 1 nagios nagiosxi 215568 Aug 12 10:10 check_ntp_peer
-rwxr-xr-x. 1 nagios nagiosxi 214376 Aug 12 10:10 check_ntp_time
-rwxr-xr-x. 1 nagios nagiosxi 245880 Aug 12 10:10 check_nwstat
-rwxr-xr-x. 1 nagios nagiosxi 9468 Aug 12 10:10 check_oracle
-rwxr-xr-x. 1 nagios nagiosxi 196672 Aug 12 10:10 check_overcr
-rwxr-xr-x. 1 nagios nagiosxi 229040 Aug 12 10:10 check_ping
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_pop -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 230152 Aug 12 10:10 check_procs
-rwxr-xr-x. 1 nagios nagiosxi 189264 Aug 12 10:10 check_real
-rwxr-xr-x. 1 nagios nagiosxi 9679 Aug 12 10:10 check_rpc
-rwxr-xr-x. 1 nagios nagiosxi 1630 Aug 12 10:10 check_sensors
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_simap -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 257088 Aug 12 10:10 check_smtp
-rwxr-xr-x. 1 nagios nagiosxi 267776 Aug 12 10:10 check_snmp
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_spop -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 188720 Aug 12 10:10 check_ssh
-rwxr-xr-x. 1 nagios nagiosxi 12544 Aug 12 10:10 check_ssl_validity
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_ssmtp -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 168024 Aug 12 10:10 check_swap
-rwxr-xr-x. 1 nagios nagiosxi 238816 Aug 12 10:10 check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 188664 Aug 12 10:10 check_time
lrwxrwxrwx. 1 root root 9 Aug 12 10:10 check_udp -> check_tcp
-rwxr-xr-x. 1 nagios nagiosxi 201728 Aug 12 10:10 check_ups
-rwxr-xr-x. 1 nagios nagiosxi 158192 Aug 12 10:10 check_uptime
-rwxr-xr-x. 1 nagios nagiosxi 156792 Aug 12 10:10 check_users
-rwxr-xr-x. 1 nagios nagiosxi 3270 Aug 12 10:10 check_wave
-rwxr-xr-x. 1 nagios nagiosxi 147784 Aug 12 10:10 negate
-rwxr-xr-x. 1 nagios nagiosxi 145808 Aug 12 10:10 remove_perfdata
-rwxr-xr-x. 1 nagios nagiosxi 142432 Aug 12 10:10 urlize
-rwxr-xr-x. 1 nagios nagiosxi 1914 Aug 12 10:10 utils.pm
-rwxr-xr-x. 1 nagios nagiosxi 2791 Aug 12 10:10 utils.sh
Any suggestions would be gratefully accepted.
TIA
Nigel.