<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hello,<br>
<br>
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. <br>
<br>
Here is a host that has updates pending:<br>
<br>
<img src="cid:part1.wDIV5iWV.AK2ZeiLd@colorado.edu" alt=""><br>
<br>
You can see "sark" is missing from the "System Updates" check
output. <br>
<br>
Here is a system that has no pending updates:<br>
<br>
<img src="cid:part2.PVGZZ0cS.yox1ddGF@colorado.edu" alt=""><br>
<br>
Again, the hostname is missing, and most of the script output is
also gone as well. <br>
<br>
Here is the actual plugin output from the command line for both:<br>
<br>
<span style="font-family:monospace">clu: <span style="color:#000000;background-color:#ffffff;">/usr/lib/nagios/plugins/check_apt
--critical="^[^\(]*\(.*
(Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" -o
</span><br>
APT OK: 1 packages available for upgrade (0 critical updates).
|available_upgrades=1;;;0 critical_updates=0;;;0</span><br>
<br>
<span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">sark:
/usr/lib/nagios/plugins/check_apt --critical="^[^\(]*\(.*
(Debian-Security:|Ubuntu:[^/]*/[^-]*-security)" -o
</span><br>
APT CRITICAL: 46 packages available for upgrade (46 critical
updates). |available_upgrades=46;;;0 critical_updates=46;;;0<br>
</span><br>
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. <br>
<br>
Thanks!<br>
<br>
Eric Schoeller<br>
Office of Information Technology<br>
University of Colorado Boulder<br>
</body>
</html>