Xymon Mailing List Archive search

Trends graph limit

list Jeremy Laidman
Tue, 4 Jun 2024 09:37:23 +1000
Message-Id: <CACO=user-1ce5414ee46f@xymon.invalid>

No problem, happy I could help.

As a bonus, for those who have so many trends graphs that it was triggering
this issue, you may benefit from this hack. I use a wrapper script around
my svcstatus.cgi binary, which adds searchable text onto the trends page,
naming each graph suitably. This makes it much easier to jump to a
particular graph, rather than having to scroll and scroll, and read all of
the graph titles until I find the one I'm looking for. Instead, I just
press "ctrl-F" in my browser, and type (eg) "dnscache" to jump to those
graphs.

[image: image.png]

The script is quite simple, and is mostly the original wrapper script from
a previous version of Xymon that didn't use cgiwrap:

#!/bin/sh
# This is a wrapper for the Xymon svcstatus.cgi script
. /usr/lib/xymon/server/etc/cgioptions.cfg
exec /usr/lib/xymon/server/bin/svcstatus.cgi $CGI_SVC_OPTS |
sed '/begindata/,/Status report info/{s/<table summary="\([^"]*\)
Graph">/<table summary="\1">\1/;}'

I've removed (renamed, actually) the svcstatus.sh hard link in the cgi-bin
directory, that was linking to the cgiwrap binary, and replaced it with
this script. It mostly does what the cgiwrap binary does, in setting up the
environment, and calling svcstatus.cgi, but it also uses sed on the HTML
output to insert the graph tags. I probably should replace svcstatus.cgi
instead of svcstatus.sh with an equivalent, but this is working how I have
it, so I'm not changing anything.

J

On Mon, 3 Jun 2024 at 22:27, Mario <user-82c7780661a4@xymon.invalid> wrote:
Hello Jeremy,

Thank you very much for the patch!

Best regards,
Mario

On Sun, Jun 2, 2024 at 8:40?PM Jeremy Laidman <user-0608abae5e7c@xymon.invalid> wrote:
Sorry, my memory can't be trusted.

On Mon, 3 Jun 2024 at 08:51, Jeremy Laidman <user-0608abae5e7c@xymon.invalid> wrote:
Rather than doing a "make install", I would have copied just the
svcstatus.sh file produced by the compile, in place of the existing file
(after making a backup), and set the ownership and permissions to match.
The binary that is produced by compiling is called "svcstatus.cgi", not
"svcstatus.sh".

J
Attachments (1)