Xymon Mailing List Archive search

batch configuration of critical systems?

list Jeremy Laidman
Thu, 16 Oct 2014 13:51:07 +1100
Message-Id: <user-7e51c5c917ff@xymon.invalid>

On 16 October 2014 11:58, Richard Hamilton <user-af55987f6d56@xymon.invalid> wrote:
Is there a recommended/supported mechanism to configure (and as needed,
update or replace the configuration) of critical systems from the command
line?
I doubt it.  There's only one binary that updates the critical
configuration file, and that's criticaleditor.cgi.

You might be able to cobble together a script that calls criticaleditor.cgi
with the required parameters/environment to simulate a web browser. But it
seems a lot of trouble, when you can just update the file.

As far as I can tell, there's no locking in the web interface, so if two
updates happen at around the same time, the second one wins, and the
changes in the first save will be lost.  So I don't think you can make it
much worse by implementing an extra interface to the file, but if you
wanted to avoid concurrency problems like this, you could disable the CGI,
and also include some kind of locking code in your own script.

J