Hello,

This is a corner-case problem and I'm not entirely sure if it's something anyone will want to address. But I figured I'd mention it. I still use the text-based Nagios UI "cnagios" and it's having trouble parsing the output from check_apt in a way that I've never seen before. The hostname is gone and most of the status text is missing. Here are some examples, I'm not sure if images will come through on this list so if they don't I'll try to re-send as text only.

Here is a host that has updates pending:



You can see "sark" is missing from the "System Updates" check output.

Here is a system that has no pending updates:



Again, the hostname is missing, and most of the script output is also gone as well.

Here is the actual plugin output from the command line for both:

clu: /usr/lib/nagios/plugins/check_apt --critical="^[^\(]*\(.* (Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" -o APT OK: 1 packages available for upgrade (0 critical updates). |available_upgrades=1;;;0 critical_updates=0;;;0

sark: /usr/lib/nagios/plugins/check_apt --critical="^[^\(]*\(.* (Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" -o APT CRITICAL: 46 packages available for upgrade (46 critical updates). |available_upgrades=46;;;0 critical_updates=46;;;0

I "borrowed" that regex from the plugin help. I realize that cnagios is ancient and largely no longer supported so I can easily see this as being a problem with that software that won't get resolved, however, it processes plugin output from just about everything else OK so it leads me to believe there may be something buried within the check_apt output that may not be entirely nagios-friendly. It could simply be that it includes a newline at the end of the output, which as I recall is not exactly "compliant". cnagios doesn't wrap the plugin output onto additional lines, instead it just displays only what it can given the width of the window. I've stretched my window as wide as I can across two monitors and none of the missing text ever shows up.

Thanks!

Eric Schoeller
Office of Information Technology
University of Colorado Boulder

Reply via email to