check_by_ssh does not populate output file in passive mode

Bug #379093 reported by S. Shvetsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nagios-plugins (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: nagios-plugins-basic

Nagios plugin check_by_ssh doesn't work as expected in passive mode. The output file is created, but not populated, same check in active mode completes successfully. Same exact check executed by a newer version of the plugin, built from source, populates the output file with the result of the check as expected.

1) The release of Ubuntu, via 'lsb_release -rd':
Description: Ubuntu 8.04.2
Release: 8.04

2) The version of the package, via 'apt-cache policy nagios-plugins-basic':
nagios-plugins-basic:
  Installed: 1.4.11-1ubuntu5
  Candidate: 1.4.11-1ubuntu5
  Version table:
 *** 1.4.11-1ubuntu5 0
        500 http://ca.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

3) What I expect to happen:
When check_by_ssh is ran in passive mode, it should output the result of the remote check command to the explicitly specified output file. This result should already be in passive check result format (see below) so it can be easily appended to Nagios external command file. Here's an example:

$ ./check_by_ssh -H remotehost -n testhost -s apt -C "/usr/lib/nagios/plugins/check_apt" -O /tmp/result
$ cat /tmp/result
[1242858973] PROCESS_SERVICE_CHECK_RESULT;testhost;apt;0;APT OK: 0 packages available for upgrade (0 critical updates).

I was able to achieve the desired behaviour by running newer version of the check_by_ssh plugin, which I manually complied from official 1.4.13 source package.

4) What happened instead:
When I ran the latest binary Hardy (i386) version of the plugin

$ ./check_by_ssh -H remotehost -n testhost -s apt -C "/usr/lib/nagios/plugins/check_apt" -O /tmp/result
APT OK: 0 packages available for upgrade (0 critical updates). $

The active check result was printed to stdout, but nothing was printed to /tmp/result. It's almost as if plugin is executing in active, rather than passive mode.

Not sure if it matters, but I'm running Ubuntu JeOS as VMware gues OS.
I believe this is the source package for this binary package: https://launchpad.net/ubuntu/hardy/+source/nagios-plugins/1.4.11-1ubuntu5

Revision history for this message
Thierry Carrez (ttx) wrote :

Fixed in 1.4.12 (Jaunty / Karmic).

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Karmic Koala.

This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please do steps 1 and 2 of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in nagios-plugins (Ubuntu):
status: New → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote :

Patch in check_by_ssh, for reference

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.