Xymon Mailing List Archive search

xymon "hostinfo" does not honour tags set by `.default.`

3 messages in this thread

list Thomas Eckert · Sun, 29 Oct 2017 19:08:14 +0100 ·
Brothers,

I found that the information returned by `xymon 127.0.0.1 "hostinfo"` does not honour tags by `.default.`.

Steps to reproduce:

	root at pi3:/etc/xymon# egrep -i 'default|pi3' hosts.cfg
	0.0.0.0         .default.       # nosslcert
	127.0.0.1       pi3     # bbd http://pi3/
	
	root at pi3:/etc/xymon# xymon 127.0.0.1:1984 "hostinfo host=^pi3"
	pi3|127.0.0.1|bbd|http://pi3/

(note the missing `nosslcert`-tag)

Not using `.default.` the correct set of tags is returned:

	root at pi3:/etc/xymon# egrep -i 'default|pi3' hosts.cfg
	127.0.0.1       pi3     # bbd http://pi3/ nosslcert
	
	root at pi3:/etc/xymon# xymon 127.0.0.1:1984 "hostinfo host=^pi3"
	pi3|127.0.0.1|bbd|http://pi3/|nosslcert


This makes `hostinfo` not a usable source for getting the monitoring configuration for hosts or prevents the use of `.default.`.

All the best
Thomas
list John Thurston · Tue, 31 Oct 2017 11:22:35 -0800 ·
quoted from Thomas Eckert
On 10/29/2017 10:08 AM, Thomas Eckert wrote:
I found that the information returned by `xymon 127.0.0.1 "hostinfo"` does not honour tags by `.default.`.

- snip -
This makes `hostinfo` not a usable source for getting the monitoring configuration for hosts or prevents the use of `.default.`.
I have confirmed this same behavior with xymon 4.3.26 on Solaris

It would be nice if it honored the .default. lines. If that isn't 
possible, the documentation for the "xymon hostinfo" command should be 
updated to reflect this limitation.

--
    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
list Japheth Cleaver · Tue, 31 Oct 2017 14:32:42 -0700 ·
quoted from Thomas Eckert
On 10/29/2017 11:08 AM, Thomas Eckert wrote:
Brothers,

I found that the information returned by `xymon 127.0.0.1 "hostinfo"` does not honour tags by `.default.`.

Steps to reproduce:

	root at pi3:/etc/xymon# egrep -i 'default|pi3' hosts.cfg
	0.0.0.0         .default.       # nosslcert
	127.0.0.1       pi3     # bbd http://pi3/
	
	root at pi3:/etc/xymon# xymon 127.0.0.1:1984 "hostinfo host=^pi3"
	pi3|127.0.0.1|bbd|http://pi3/

(note the missing `nosslcert`-tag)

Not using `.default.` the correct set of tags is returned:

	root at pi3:/etc/xymon# egrep -i 'default|pi3' hosts.cfg
	127.0.0.1       pi3     # bbd http://pi3/ nosslcert
	
	root at pi3:/etc/xymon# xymon 127.0.0.1:1984 "hostinfo host=^pi3"
	pi3|127.0.0.1|bbd|http://pi3/|nosslcert


This makes `hostinfo` not a usable source for getting the monitoring configuration for hosts or prevents the use of `.default.`.

All the best
Thomas
Hi,

By default, 'hostinfo' does only show the specific entries for that host. I believe it could be reworked to walk through the included default config as well, though I'm not sure if there would be any side impacts there (I don't think so).

As a workaround for now, for a specific host you can issue a "hostinfo clone=<name>" request, which should actually include the .default. entries applicable to it. The output format, however, is one-per line. (This is the interface used by certain binaries when they're doing a one-off lookup for a specific host from xymond.)

HTH,
-jc