Control: forwarded -1 https://github.com/xymon-monitoring/xymon/issues/624

I'll try to update the status of this bug report a little...

Axel Beckert schrieb am Freitag, den 30. April 2010:

> Adding the following two lines to a host in hobbit-clients.cfg...
>
>         PROC test 0 1 yellow TEXT="This is a test text with double quotes"
>         PROC test 0 2 yellow TEXT=This is a test text without double quotes
>
> results in the following strings on the procs page for that host:
>
>  "This is a test text with double quotes (found 0, req. at most 1)
>  This (found 0, req. at most 2)
>
> In the first case the leading double quote is not stripped from the
> text, but without double quotes, only the first word is taken (which
> would be fine if it would work with double quotes).

hobbit-clients.cfg is nowadays renamed to analysis.cfg.

The upstream tracker at sourceforge seems to no longer exist, so I
cannot see, what was tracked there :-(
But I found some discussion in the mailman archive at sourceforge:
https://sourceforge.net/p/xymon/mailman/message/25279576/
https://sourceforge.net/p/xymon/mailman/message/25280639/
https://sourceforge.net/p/xymon/mailman/message/25318288/

Especially the one in the middle is quite interesting, I'll cite it
here (before it's also lost on SF):

-------------- snipp ----------------
From: Asif I. <va...@gm...> - 2010-05-17 21:36:26

hmm.. I thought the syntax is

PROC test 0 2 yellow "TEXT=This is a test text without double quotes"


man hobbit-clients.cfg
[..]
PORT LOCAL=%[.:]22$ STATE=LISTEN "TEXT=SSH listener"
[..]
-------------- snipp ----------------

This is still in analysis.cfg(5):

       The  TEXT=displaytext option affects how the port appears on the "ports"
       status page. By default, the port is listed with the  local/remote/state
       rules  as  identification,  but this may be somewhat difficult to under-
       stand. You can then use e.g. "TEXT=Secure Shell" to make these ports ap-
       pear with the name "Secure Shell" instead.

       Defaults: mincount=1, maxcount=-1 (unlimited),  color="red".   Note:  No
       ports are checked by default.

       Example:  Check  that  the SSH daemon is listening on port 22. Track the
       number of active SSH connections, and warn if there are more than 5.
               PORT LOCAL=%[.:]22$ STATE=LISTEN "TEXT=SSH listener"
               PORT LOCAL=%[.:]22$ STATE=ESTABLISHED MAX=5 TRACK=ssh TEXT=SSH

I just tried this out myself:

        PROC test 0 1 yellow TEXT="This is a test text with double quotes"
        PROC test 0 2 yellow TEXT=This is a test text without double quotes
        PROC test 0 3 yellow "TEXT=This is a test text with double quotes"

which results in:

"This is a test text with double quotes (found 0, req. at most 1)
This (found 0, req. at most 2)
This is a test text with double quotes (found 0, req. at most 3)

So this works as described in the man page ("TEXT=..."), but I also
think that the first variant (TEXT="...") should also work as an
alternative (meaning that the parser should remove the leading
quotes).

I just opened an issue in the new github project:
https://github.com/xymon-monitoring/xymon/issues/624

Greetings
Roland

Reply via email to