Xymon Mailing List Archive search

TEST2RRD variable too long in xymonserver.cfg file

list Galen Johnson
Tue, 17 Apr 2018 13:17:58 -0400
Message-Id: <user-140266d55236@xymon.invalid>

Another option would be to use string concatenation; such as:

TEST2RRD="cpu=la,disk,inode,qtree"
TEST2RRD+=",memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp"
TEST2RRD+=",time=ntpstat,vmstat,iostat,netstat,temperature,apache"

Or, I do this, if you are using the Terabithia rpm (you can do this without
it but would require some extra manual setup*), add content under
$XYMONSERVER/xymonserver.cfg.d/testname that has something like the
following example for a test named "threads":


#> cat xymonserver.cfg.d/threads
GRAPHS_threads="threads"

TEST2RRD+=",threads=ncv"

SPLITNCV_threads="*:NONE,total:GAUGE,consumed:GAUGE"

this keeps everything in nice, test specific configs.

=G=

* - add the following line to your xymonserver.cfg file:
directory /etc/xymon/xymonserver.cfg.d


On Tue, Apr 17, 2018 at 11:49 AM, John Thurston <user-ce4d79d99bab@xymon.invalid>
wrote:
On 4/17/2018 7:20 AM, Jimmy Aulestia wrote:
Can I split the TEST2RRD in two o more lines?

It is one variable, so I think it must appear on one logical line.
However, I don't see any reason you can't use line-continuation to improve
the legibility. Doing so will let your content span several short visual
lines in your text file.

From the man file for hosts.cfg (the first place I looked for
continuation):
"Long lines can be broken up by putting a backslash at the end of the line
and continuing the entry on the next line."

I expect white space in the line to be stripped by the parser, so I'd
expect to be able to insert "\" and " " characters liberally. You should be
able to make your lines appear however you like.
--
   Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska