[Xymon] Questions about supplemental client messages
Jeremy Laidman
jlaidman at rebel-it.com.au
Mon Jun 27 10:03:53 CEST 2016
Hi y'all
I have some questions about the use of supplemental client messages (by
specifying a collector ID in the "client" message). The man page has very
little to say on the matter.
I want to have a client-side script that collects the latest BIND DNS
statistics and feeds them to the Xymon server via a supplemental client
message. This is achieved using the following type of command (simplified
for the exercise):
{
echo "client/named_stats $MACHINE.$SERVEROSTYPE $CONFIGCLASS"
echo "[named_stats]"
cat /path/to/latest/named.stats
} | $XYMON $XYMSRV "@"
This generates the following in the client data webpage:
<begin example>
[collector:named_stats]
client/named_stats dns.example.com.freakos
freakos
[named_stats]
+++ Statistics Dump ++ (1234567890)
...
++ Outgoing Queries ++
[View: default]
12345 A
345 NS
...
++ Resolver Statistics ++
[Common]
9693 mismatch responses received
[View: default]
...
<end example>
My questions regarding this are:
1. Should I be including the $CONFIGCLASS in the report, like other client
messages? Xymon puts the class onto a newline when I do this. The man
page says the class is optional for a client message, but if I wanted to
change the class, I don't think I would be able to. Or maybe it only makes
sense to specify the class for the main client message, and not
supplemental ones.
2. When I write the server-side processor, I'll need to collect the output
by specifying the client section name of [named_stats]. But there's also a
"[collector:named_stats] section heading that gets created automatically.
Should I be adding the "[named_stats]" section at all, or instead making
use of the [collector:named_stats] that gets created regardless? It
probably doesn't matter if I have both, but I don't want to break anything,
including some future intended use of these extra client messages.
3. The content of the client data section I'm sending happens to have
square bracketed terms like "[Common]" and "[View: default]". This makes
it impossible for me to fetch the whole [named-stats] section. My instinct
is to escape these somehow, but I don't know of any standard "Xymon" way of
doing this beyond a simple backslash.
Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160627/ca3c6efb/attachment.html>
More information about the Xymon
mailing list