On 17 September 2014 04:45, Steve Coile <user-a2e2f9aff0d1@xymon.invalid>
wrote:
I've written a client extension script that wants to maintain state
between runs, essentially to know where it left off after the last run.
Where is the "proper" place to keep such state files? On our install,
~xymon/client/tmp is a symlink to /tmp, which seems like a bad choice.
To make your script more portable (in case you want to use it, or make it
available for use, on other OSes), I think you should use $XYMONTMP. That
is, unless you have particularly different requirements to Xymon. If
$XYMONTMP that points to a location that's not suitable for your script,
then it might not be suitable for the Xymon client either, and you should
consider adjusting your client.
As Japheth said, Xymon does pretty much what you're doing when logfetch
creates its config and state files (logfetch.$MACHINE.cfg and
logfetch.$MACHINE.status). If it's good enough for Xymon, it's probably
good enough for your script. And if it's not good enough for your script,
it's probably not good enough for Xymon.
J