check_apt reports wrong/different stuff if run as the nagios user (#1294)

Tomáš Pospíšek notifications at github.com
Thu Oct 23 19:40:12 CEST 2014


This is under Debian wheezy with the Debmon packages.

    # /usr/lib/nagios/plugins/check_apt
    APT OK: 0 packages available for upgrade (0 critical updates). |available_upgrades=0;;;0 critical_updates=0;;;0

    # su -c /usr/lib/nagios/plugins/check_apt -s /bin/sh - nagios
    APT WARNING: 6 packages available for upgrade (0 critical updates). |available_upgrades=6;;;0 critical_updates=0;;;0

Related to the problem seems to be this:

    # # apt-cache policy icinga2-bin
    icinga2-bin:
      Installed: 2.1.1-1~debmon70+1
      Candidate: 2.1.1-1~debmon70+1
      Version table:
     *** 2.1.1-1~debmon70+1 0
            400 http://debmon.org/debmon/ debmon-wheezy/main amd64 Packages
            100 /var/lib/dpkg/status
         2.1.1-1~bpo70+1 0
            100 http://ftp.de.debian.org/debian/ wheezy-backports/main amd64 Packages
    N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

Where:

    # cat /etc/apt/preferences.d/debmon-pin-400 
    # prefer Debian Packages over Debmon packages
    # do not automatically update
    Package:  *
    Pin: release o=debmon.org
    Pin-Priority: 400

I'm thinking that it's related to this, because there are 6 packages coming
from the debmon Repository that have really similar versions in the
backports repository.

However neither "apt-cache policy", nor "dpkg --compare-versions" seem to
behave differently when run as the nagios user or root. So at this point I
have no idea why check_apt behaves differently under the nagios user.

-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20141023/8ef974c1/attachment.html>


More information about the Devel mailing list