Hi John and list,
This sounds like some good patches, so I thank you for sharing them!
I had some related ideas as a result:
Calculate numbers of green, yellow, red, purple, blue and clear tests - I
think this is already done as they are on the xymongen page - and make
those figures available via variables in the same way.
Add similar (to XYMONALLOKTEXT) configurable text (via a different
variable) to the non-green page, red page, and main page.
Default to, or add an example of how to: display the number of reds,
yellows and purples to the non-green and red pages.
Default to, or add an example of how to: display the number of reds,
yellows, purples, blues, clears and greens to the main page.
I believe all these variables are available on the xymongen page already,
and they are in ncv format so maybe it's possible to get xymon to graph
them already, but I think a graph with all those variables on would be
good for management. If anyone has the configuration for it, I think it
would be worth sharing it and adding to Xymon by default (in some
release).
Kind regards,
SebA
On Wed, 23 Oct 2019 at 16:07, John Horne <user-e95f1ec2f147@xymon.invalid>
wrote:
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.