Return code of 127 is out of bounds – plugin may be missing
On the check_command, I had to prepend check_nrpe! since we are using the nrpe client on the server to read and return us the desired value.
No output returned from plugin
On the check_command, I had to append, with for example !1, since we need to pass $$ARG1$$
NRPE: Command ‘check_apt’ not defined
Check you /etc/nagios/nrpe.cfg you need to set it up there.
Well, I got it working!
On nagios nrpe server my /etc/nagios/nrpe.cfg I add the following line
command[check_apt]=/usr/lib/nagios/plugins/check_apt
Restart nagios-nrpe
service nagios-nrpe-server restart
On nagios server my /etc/nagios/hosts/s4.domain.com.cfg this is what I have
define service { use generic-service host_name s4.domain.com service_description SYS: system updates check_command check_nrpe!check_apt!1 }
Restart nagios server
service nagios restart
Hooray!