0

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.

1
  • Show us the command definition of your check_apt I would bet the problem is almost certainly there, and not in your service/hostgroup.
    – Zoredache
    Mar 8, 2017 at 20:12

1 Answer 1

2

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.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.