I have setup nagios to monitor apt on my Debian servers. The problem is that I cannot understand why it is showing me the available number of updates on the local server also for the network servers.
For example I have a server that has 32 packages to update, but I am getting an email alert for 2.
Services Config:
define service {
hostgroup_name apt-servers
service_description APT
check_command check_apt
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
}
Hosts Config
define hostgroup {
hostgroup_name apt-servers
alias APT servers
members vps1, vps2, vps3
}
Command Config
From Debian package (untouched)
# 'check_apt' command definition
define command{
command_name check_apt
command_line /usr/lib/nagios/plugins/check_apt
}
# 'check_apt_distupgrade' command definition
define command{
command_name check_apt_distupgrade
command_line /usr/lib/nagios/plugins/check_apt -d
}
I have tried to search for documentation on how to configure but failed to fin any extensive one.
Best Answer
To run this plugin on anything other than localhost, you need to run it through an agent of some sort.
For example:
NRPE
,check_by_ssh
with keys, etc.(This also applies to memory usage, load, disk usage... anything that's not available via a network socket.)