Export to GitHub

molniya - issue #12

Cleaner status output


Posted on Jan 5, 2010 by Massive Hippo

First off, great project! Glad to help with Linux testing as needed.

What steps will reproduce the problem? 1. Type 'status' to the Nagios bot using Pidgin (latest release) 2. 3.

What is the expected output? What do you see instead? I would like to see something cleaner. For example, a line break between each warning or critical, or even the option of removing the links from the output. This is what I see:

(09:09:13 AM) Nagios:

WARNING: ym-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=ym-a01)/Disk - /backup (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=ym-a01&service=Disk%20-%20/backup) for 3d; utl-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=utl-a01)/Disk Usage (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=utl-a01&service=Disk%20Usage) for 2087w5d; dmrs-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=dmrs-a01)/Disk Usage (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=dmrs-a01&service=Disk%20Usage) for 11h6m; dmc-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=dmc-a01)/HTTP Logs (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=dmc-a01&service=HTTP%20Logs) for 15h2m; dotomidm (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=dotomidm)/Memory (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=dotomidm&service=Memory) for 4d1h; mpdb-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=mpdb-a01)/Oracle Status (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=mpdb-a01&service=Oracle%20Status) for 6h43m; db-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=db-a01)/Oracle Status (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=db-a01&service=Oracle%20Status) for 2087w5d; pgf-a03 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgf-a03)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgf-a03&service=PG%20Truncate) for 2087w5d; pgr-a05 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a05)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a05&service=PG%20Truncate) for 4d8h; pgr-a07 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a07)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a07&service=PG%20Truncate) for 4d8h; pgr-a03 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a03)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a03&service=PG%20Truncate) for 4d8h; pgr-a04 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a04)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a04&service=PG%20Truncate) for 4d8h; pgr-a06 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a06)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a06&service=PG%20Truncate) for 4d8h; pgr-a08 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a08)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a08&service=PG%20Truncate) for 4d8h; pgr-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a01)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a01&service=PG%20Truncate) for 4d8h; pgf-a05 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgf-a05)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgf-a05&service=PG%20Truncate) for 2087w5d; pgr-a02 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgr-a02)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgr-a02&service=PG%20Truncate) for 4d8h; pgf-a04 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgf-a04)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgf-a04&service=PG%20Truncate) for 2087w5d; pgf-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgf-a01)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgf-a01&service=PG%20Truncate) for 2087w5d; pgf-a02 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=pgf-a02)/PG Truncate (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=pgf-a02&service=PG%20Truncate) for 2087w5d

CRITICAL: advdb-a01 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=advdb-a01)/Disk Usage (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=advdb-a01&service=Disk%20Usage) for 1d1h; dotomidm (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=dotomidm)/Disk Usage (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=dotomidm&service=Disk%20Usage) for 1d1h; advdb-a02 (http://monitor.dotomi.com/nagios/cgi-bin/status.cgi?host=advdb-a02)/Disk Usage (http://monitor.dotomi.com/nagios/cgi-bin/extinfo.cgi?type=2&host=advdb-a02&service=Disk%20Usage) for 1d1h

What version of the product are you using? On what operating system? 0.2.1, Nagios 3.2.0, Pidgin 2.5.9-1 on Centos 5.4 x64, Pidgin 2.6.4 on WinXP 32 bit

Please provide any additional information below. I'm really not sure if this is the standard output or if this may be an issue with Pidgin. The option for a simpler output would be ideal, for example:

WARNINGS: $HOSTNAME$: $SERVICE$ $SERVICESTATE$ for $TIME$ [ack ID] $HOSTNAME$: $SERVICE$ $SERVICESTATE$ for $TIME$ [ack ID]

CRITICALS: $HOSTNAME$: $SERVICE$ $SERVICESTATE$ for $TIME$ [ack ID] $HOSTNAME$: $HOSTSTATE$ for $TIME$ [ack ID]

Comment #1

Posted on Apr 21, 2010 by Happy Hippo

I need to track this down further; IM clients seem to handle XHTML-formatted messages in various ways. Adium does a neater job and just displays hyperlinks.

As a workaround, I've made the formatting mode configurable as of revision 36; add the following line to your configuration file and you'll get much neater-looking output with your client:

xmpp_fmt: plain

Ultimately, I need to find a better way of handling this, perhaps keeping a list of XHTML-capable clients?

Status: Started

Labels:
Type-Defect Priority-Medium