After years of wanting to use COMPACT: in hosts.cfg but never getting it to work, I finally decided to have a closer look.
It turns out there are a few small problems that need attention. In particular, the documentation is wrong about delimiters. If you use the syntax shown in the man page then it will crash (or not depending on some undocumented behaviour with strlen and NULL input).
The correct format is actually:
COMPACT:newfield=oldfield1|oldfield2|oldfield3,anothernewfield=oldfield4|oldfield5
Etc.
These patches correct the manpage, make the software more robust against crashes when you try the bad syntax, and fix a problem with clicking on the summary icon.
This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender.
I didn't know compact existed. I gave it a try, and it did compact it down, but if I click on the column, I just get "status not available".
That's not useful.
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Scott, Brian Sent: Wednesday, June 17, 2015 12:03 AM To: xymon at xymon.com Subject: [Xymon] Making COMPACT: work
After years of wanting to use COMPACT: in hosts.cfg but never getting it to work, I finally decided to have a closer look.
It turns out there are a few small problems that need attention. In particular, the documentation is wrong about delimiters. If you use the syntax shown in the man page then it will crash (or not depending on some undocumented behaviour with strlen and NULL input).
The correct format is actually:
COMPACT:newfield=oldfield1|oldfield2|oldfield3,anothernewfield=oldfield4|oldfield5
Etc.
These patches correct the manpage, make the software more robust against crashes when you try the bad syntax, and fix a problem with clicking on the summary icon.
This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender.
This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
On Wed, June 17, 2015 8:17 am, Root, Paul T wrote:
I didn't know compact existed. I gave it a try, and it did compact it down, but if I click on the column, I just get "status not available".
That's not useful.
COMPACT is intended more for page display alteration purposes than test combining. To get a clickable dot, you'd want to use combostatus and combo.cfg, which allows for a more logical combination options, albeit in a slightly awkward syntax.
It would be useful to combine the two aspects of this somewhat into a unified syntax. It could still be handled on by the generators and parsers, with xymongen and svcstatus.cgi doing the calculation work "live" at display time (like COMPACT), or instead by a "combo.cfg"-aware status (or stachg) channel listener which re-injects the results of combo calculations as warranted, or by xymond itself. Each has pluses and minuses.
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Scott, Brian Sent: Wednesday, June 17, 2015 12:03 AM To: xymon at xymon.com Subject: [Xymon] Making COMPACT: work
After years of wanting to use COMPACT: in hosts.cfg but never getting it to work, I finally decided to have a closer look.
It turns out there are a few small problems that need attention. In particular, the documentation is wrong about delimiters. If you use the syntax shown in the man page then it will crash (or not depending on some undocumented behaviour with strlen and NULL input).
The correct format is actually:
COMPACT:newfield=oldfield1|oldfield2|oldfield3,anothernewfield=oldfield4|oldfield5
Etc.
These patches correct the manpage, make the software more robust against crashes when you try the bad syntax, and fix a problem with clicking on the summary icon.
Thanks for these. I'd actually been meaning to apply the patch from last week relating to COMPACT, but was initially stymied by some of the same issues and hadn't had a chance to dig deeper.
I'll apply these in soon.
Regards,
-jc
participants (3)
-
brian.scott4@det.nsw.edu.au
-
cleaver@terabithia.org
-
Paul.Root@CenturyLink.com