pmp-check-unix-memory stopped working because of new output from free

Bug #1610878 reported by Christian Biamont
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
nagios-plugins-contrib (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned
Yakkety
Fix Released
Medium
Brian Murray
Zesty
Fix Released
Medium
Unassigned

Bug Description

Hello,

Current pmp-check-unix-memory in package nagios-plugins-contrib does not work anymore, from Ubuntu Xenial. It can't fetch free memory and therefor presents it incorrectly.

E.g:

$ ./pmp-check-unix-memory
OK Memory % used | memory_used=0;90;95;0;100

As of version 3.3.10 of package procps, the command "free" uses a different output.

See: http://upstream.rosalinux.ru/changelogs/procps-ng/3.3.10/changelog.html

How free memory is calculated was changed in kernel here: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773

This problem has been fixed in the percona-monitoring-plugins repo on GitHub:

https://github.com/percona/percona-monitoring-plugins/commit/b4636c49f0188d2af1235293d01396abeddacf7f

I have ported and tested the fix and it is working, both on a computer with older procps and on a computer running Ubuntu Xenial.

Will submit a debdiff with proposed patch shortly.

Best regards,
Christian Biamont

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nagios-plugins-contrib (Ubuntu):
status: New → Confirmed
Mathew Hodson (mhodson)
tags: added: patch
Changed in nagios-plugins-contrib (Ubuntu):
importance: Undecided → Medium
tags: added: xenial
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Debdiff looks good, but could you please add Patch Tagging to the patch it adds. Please see the following:

http://dep.debian.net/deps/dep3/

Also, please add the patch at the end of the series file, not at the beginning.

Thanks!

Changed in nagios-plugins-contrib (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Christian Biamont (christianbiamont) wrote :

Attaching a new debdiff with the changes requested.

Changed in nagios-plugins-contrib (Ubuntu):
status: Incomplete → Confirmed
Changed in nagios-plugins-contrib (Ubuntu Xenial):
status: New → Confirmed
Changed in nagios-plugins-contrib (Ubuntu Yakkety):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

New debdiff looks good. I've uploaded it to zesty with a slight changelog formatting adjustment.

Thanks!

Changed in nagios-plugins-contrib (Ubuntu Zesty):
status: Confirmed → Fix Committed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I'm unsubscribing the ubuntu-sponsors team. Please re-subscribe the team once debdiffs for xenial and yakkety have been attached. Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios-plugins-contrib - 16.20151226ubuntu1

---------------
nagios-plugins-contrib (16.20151226ubuntu1) zesty; urgency=medium

  * pmp-check-unix-memory: Consider MemAvailable if available in
    /proc/meminfo. (LP: #1610878)

 -- Christian Biamont <email address hidden> Mon, 08 Aug 2016 09:41:35 +0200

Changed in nagios-plugins-contrib (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Christian Biamont (christianbiamont) wrote :

The same debdiff works for Xenial and Yakkety. Thank you.

Mathew Hodson (mhodson)
tags: added: regression-release
Changed in nagios-plugins-contrib (Ubuntu Xenial):
importance: Undecided → High
Changed in nagios-plugins-contrib (Ubuntu Yakkety):
importance: Undecided → High
Mathew Hodson (mhodson)
Changed in nagios-plugins-contrib (Ubuntu Xenial):
importance: High → Medium
Changed in nagios-plugins-contrib (Ubuntu Yakkety):
importance: High → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

I've sponsored these to the SRU queues for review by the SRU team. I did make some versioning changes e.g.

nagios-plugins-contrib_16.20151226ubuntu0.16.04.1.dsc
nagios-plugins-contrib_16.20151226ubuntu0.16.10.1.dsc

Changed in nagios-plugins-contrib (Ubuntu Xenial):
status: Confirmed → In Progress
Changed in nagios-plugins-contrib (Ubuntu Yakkety):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Christian, or anyone else affected,

Accepted nagios-plugins-contrib into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nagios-plugins-contrib/16.20151226ubuntu0.16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nagios-plugins-contrib (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in nagios-plugins-contrib (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Christian, or anyone else affected,

Accepted nagios-plugins-contrib into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nagios-plugins-contrib/16.20151226ubuntu0.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Christian Biamont (christianbiamont) wrote :

Hello!

I tested the package version 16.20151226ubuntu0.16.04.1 on Xenial. It works as expected. The output looks good.

# dpkg -l nagios-plugins-contrib
ii nagios-plugins-contrib 16.20151226 amd64
# /usr/lib/nagios/plugins/pmp-check-unix-memory
OK Memory % used | memory_used=0;90;95;0;100

# dpkg -l nagios-plugins-contrib
ii nagios-plugins-contrib 16.20151226ubuntu0.16.04.1 amd64
# /usr/lib/nagios/plugins/pmp-check-unix-memory
OK Memory 51% used | memory_used=51;90;95;0;100

Christian

tags: added: verification-done
removed: verification-needed
tags: added: verification-done-xenial verification-needed
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios-plugins-contrib - 16.20151226ubuntu0.16.04.1

---------------
nagios-plugins-contrib (16.20151226ubuntu0.16.04.1) xenial; urgency=medium

  * pmp-check-unix-memory: Consider MemAvailable if available in /proc/meminfo. (LP: #1610878)

 -- Christian Biamont <email address hidden> Tue, 28 Feb 2017 10:18:11 -0800

Changed in nagios-plugins-contrib (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Here, I verified this for yakkety:

(yakkety-amd64)root@impulse:/tmp# /usr/lib/nagios/plugins/pmp-check-unix-memory
OK Memory 43% used | memory_used=43;90;95;0;100
(yakkety-amd64)root@impulse:/tmp# apt-cache policy nagios-plugins-contrib
nagios-plugins-contrib:
  Installed: 16.20151226ubuntu0.16.10.1
  Candidate: 16.20151226ubuntu0.16.10.1
  Version table:
 *** 16.20151226ubuntu0.16.10.1 500
        500 http://192.168.10.7/ubuntu yakkety-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     16.20151226 500
        500 http://192.168.10.7/ubuntu yakkety/universe amd64 Packages

tags: added: verification-done-yakkety
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nagios-plugins-contrib - 16.20151226ubuntu0.16.10.1

---------------
nagios-plugins-contrib (16.20151226ubuntu0.16.10.1) yakkety; urgency=medium

  * pmp-check-unix-memory: Consider MemAvailable if available in /proc/meminfo. (LP: #1610878)

 -- Christian Biamont <email address hidden> Tue, 28 Feb 2017 10:18:11 -0800

Changed in nagios-plugins-contrib (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for nagios-plugins-contrib has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.