Icinga using the "wrong" monitoring-plugins

Hi,

I currently running a small icinga test instance on ubuntu 20.04 in a vm and I want the service “check_apt” to warn if there are more than 10 packages available instead of 1.
Monitoring-Plugins 2.3.1 offers the parameter “-w” for this (Monitoring Plugins - check_apt), yet my version of this package is 2.2.x
So I pinned the 2.3.1 version according to this guide: PinningHowto - Community Help Wiki

Both apt-cache and apt policy show that the 2.3.1 version is being available and the terminal output when installing monitoring-plugins also indicates that it is indeed the desired version.

According to vim /etc/icinga2/constants.conf icinga uses the /usr/lib/nagios/plugins/ directory.
However “/usr/lib/nagios/plugins/check_apt -V” says that it is the 2.2.x version that is being used by icinga.

My question is: How do I update monitoring-plugins in a way that icinga actually uses the newer version?

Please show us the output from the two commands:

  1. apt-cache policy monitoring-plugins{,-common}

  2. find / -name check_apt

Antony.

Hello Antony,

apt-cache policy monitoring-plugins{,-common}

monitoring-plugins:
  Installed: 2.3.1-1ubuntu4
  Candidate: 2.3.1-1ubuntu4
  Version table:
 *** 2.3.1-1ubuntu4 1000
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.2-6ubuntu1.2 990
        990 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     2.2-6ubuntu1 990
        990 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
monitoring-plugins-common:
  Installed: 2.2-6ubuntu1.2
  Candidate: 2.2-6ubuntu1.2
  Version table:
     2.3.1-1ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
 *** 2.2-6ubuntu1.2 990
        990 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.2-6ubuntu1 990
        990 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

find / -name check_apt

/usr/lib/nagios/plugins/check_apt

Do I need to pin/install “monitoring-plugins-common” to match the package version of “monitoring-plugins”?

monitoring-plugins:
Installed: 2.3.1-1ubuntu4

So, you have 2.3.1 installed. Good.

monitoring-plugins-common:
Installed: 2.2-6ubuntu1.2

Oh, you have 2.2.6 installed. Not so good.

Do I need to pin/install “monitoring-plugins-common” to match the package
version of “monitoring-plugins”?

Yes. I would also do -basic and -standard.

Antony.

Updating “common” and “basic” does not seem to be as easy as just “monitoring-plugins”. Both require a more recent version of libc6, which comes with its own slew of problems.

Is there a simpler way to set a warning threshold for check_apt?

Performed an OS Upgrade to Ubuntu 22.04 and used the newer version of the monitoring plugins package.

Works like a charm.