Xymon Mailing List Archive search

hosts.cfg validity check

1 message in this thread

list John Thurston · Mon, 27 Jan 2020 15:12:53 -0900 ·
What's a simple way to programmatically confirm a hosts.cfg is syntactically valid?

With apache web server, one can do
   apachectl -t
to parse the config file without launching the daemon.

What are my options with xymon? I see I can do
   xymond --hosts=hosts.cfg
but that looks like it is going to launch the daemon

It looks like xymonnet offers the --no-update flag, but doesn't let me explicitly specify a hosts.cfg

I thought the xymoncfg utility would do it. But it seems to always end with exit-code == 0 regardless of what I feed it.

I thought maybe I could use xymoncmd with an explicit hosts.cfg to call xymonnet, but it appears I'd need to create a whole new environment file rather than just passing in the name of a new hosts.cfg


How can I confirm a hosts.cfg isn't going to crash my xymon instance before I feed it to my actual instance?

-- 
    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