Nagios ssh proxy apt check not working correctly
Posted: Thu Jun 21, 2018 5:31 pm
From the web UI, I run the check command on an Ubuntu 14.04.5 server and in the Nagios UI I am showing no critical updates pending:
[nagios@sec-nagios-001 ~]$ /usr/local/nagios/libexec/check_by_ssh -H 127.0.0.1 -t 40 -C "/usr/local/nagios/libexec/check_apt -U -t 20" -E
APT WARNING: 59 packages available for upgrade (0 critical updates). |available_upgrades=59;;;0 critical_updates=0;;;0
When I run the same command via the shell from the nagios server, I receive the same result above.
Upon login via ssh to the same system, I receive this:
70 packages can be updated.
45 updates are security updates.
Why is there such a difference in packages available to update via Nagios and the Ubuntu server itself?
I am not seeing this on any Ubuntu 16.04 servers using ssh proxy apt checks. However, it does seem to be occurring for the apt checks on the Ubuntu 16.04 servers with passive checks enabled.
Ubuntu 16.04.4 server passive apt check status from Nagios XI web UI:
APT WARNING: 4 packages available for upgrade (0 critical updates).
Ubuntu 16.04.4 server passive apt check ssh shell login status:
55 packages can be updated.
34 updates are security updates.
ncpa version is 2.1.4-1
[nagios@sec-nagios-001 ~]$ /usr/local/nagios/libexec/check_by_ssh -H 127.0.0.1 -t 40 -C "/usr/local/nagios/libexec/check_apt -U -t 20" -E
APT WARNING: 59 packages available for upgrade (0 critical updates). |available_upgrades=59;;;0 critical_updates=0;;;0
When I run the same command via the shell from the nagios server, I receive the same result above.
Upon login via ssh to the same system, I receive this:
70 packages can be updated.
45 updates are security updates.
Why is there such a difference in packages available to update via Nagios and the Ubuntu server itself?
I am not seeing this on any Ubuntu 16.04 servers using ssh proxy apt checks. However, it does seem to be occurring for the apt checks on the Ubuntu 16.04 servers with passive checks enabled.
Ubuntu 16.04.4 server passive apt check status from Nagios XI web UI:
APT WARNING: 4 packages available for upgrade (0 critical updates).
Ubuntu 16.04.4 server passive apt check ssh shell login status:
55 packages can be updated.
34 updates are security updates.
ncpa version is 2.1.4-1