[Xymon] Trends graph limit

Jeremy Laidman jeremy at laidman.org
Tue Jun 4 01:37:23 CEST 2024


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 <rower.master at gmail.com> wrote:

> Hello Jeremy,
>
> Thank you very much for the patch!
>
> Best regards,
> Mario
>
> On Sun, Jun 2, 2024 at 8:40 PM Jeremy Laidman <jeremy at laidman.org> wrote:
>
>> Sorry, my memory can't be trusted.
>>
>> On Mon, 3 Jun 2024 at 08:51, Jeremy Laidman <jeremy at laidman.org> 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20240604/48f97783/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 190555 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20240604/48f97783/attachment.png>


More information about the Xymon mailing list