[Xymon] [PATCH] - xymonserver - all ok message - part 2

John Horne john.horne at plymouth.ac.uk
Wed Oct 23 17:07:04 CEST 2019


Hello,

This is the second of two sets of patches, both of which are based on the
Terabithia 4.3.30 RPMs.

Currently when all the clients/hosts report green a message on the 'All non-
green view' page is displayed saying 'All Monitored Systems OK'. I was asked
'what' is all green - that is, how many things are you testing? These patches
allow the above message to include two variables which will be converted into
numbers. (Management love to see numbers.) One variable (#XMHOSTS) reports the
number of clients/hosts configured (taken from the xymongen.c 'hostcount'
variable), the second variable (#XMTESTS) shows the number of tests being
performed (taken from the xymongen.c 'statuscount' variable).

So, in our case we have the following defined in our xymonserver.cfg file:

======
XYMONALLOKTEXT="<FONT SIZE=+4 FACE=\"Arial, Helvetica\"><BR><BR><I>All
Monitored Systems OK</I></FONT><BR><BR><FONT SIZE=+3 FACE=\"Arial,
Helvetica\"><I>(Monitoring #XMHOSTS devices;  performing #XMTESTS
tests)</I></FONT><BR><BR>"
======

So when everything is green, then on the 'All non-green view' web page we see
the following message (centered on the page):

=====
All Monitored Systems OK
(Monitoring 62 devices;  performing 1165 tests)
=====

The first set of patches created a second xymonserver.cfg configuration
variable (XYMONALLOKCRIT) to be used on the 'Critical systems' web page. The
reason was that the number of clients/hosts and tests may be misinterpreted if
displayed on that page. For example, is the number of hosts the total number of
hosts or just the number of configured critical hosts? To avoid any
misinterpretation, XYMONALLOKCRIT does not expand any included variables.

Included in these patches is a change to the 'loaddata.c' file. This produces
the statistics shown on the xymongen web page. It excludes the count of 'info'
and 'trends' messages, since these are generated by Xymon and not real tests.
By default they always show a green colour, although the colour is configurable
in the xymonserver.cfg file, and so would bias the green percentage. The patch
excludes the 'clientlog' entries as well. These too are always shown as green
by default. Although they are not generated as such, the column just shows data
already received from the client. As such they are not an actual test, and
should not be included in the statistics. By doing this, the 'statuscount'
value now matches the number of actual test results seen in the
'/var/lib/xymon/hist' directory.

Again, the patches are relatively small in size.



John.

--
John Horne | Senior Operations Analyst | Technology and Information Services
University of Plymouth | Drake Circus | Plymouth | Devon | PL4 8AA | UK
________________________________
[http://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>

This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loaddata.c.patch
Type: text/x-patch
Size: 593 bytes
Desc: loaddata.c.patch
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20191023/c656195c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pagegen.c.patch
Type: text/x-patch
Size: 1228 bytes
Desc: pagegen.c.patch
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20191023/c656195c/attachment-0001.bin>


More information about the Xymon mailing list