1

I have two servers, both running 12.04 server, and nagios-nrpe-server.

On both, I have configured the command check_apt, which runs /usr/lib/nagios/plugins/check_apt.

On both, nagios-nrpe-server is configured to run as the nagios user.

Unfortunately, on one of the servers, I always receive an OK signal with 0 updates when, from a different server, I run /usr/lib/nagios/plugins/check_nrpe -H hostname -c check_apt, despite there being updates.

I followed this through and noticed that on one server, check_apt runs as the nagios user and does indeed return with a warning or critical when required.

The other, problematic server, always says 0 updates required when run as the nagios user, but will always give the correct response when run as root.

On this problematic server, I also note that the MOTD always displays the wrong number of packages. It's as if neither commands are allowed to access the number of updates for a server.

BuZZ-dEE
  • 14,533
SuperMatt
  • 3,993

1 Answers1

0

You can use sudo to run this command as nagios user. nagios user has to execute this command:

nagios  ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/check_apt
heemayl
  • 93,925
PKumar
  • 3,182