[Xymon] xymond_filestore - appending to files?

John Horne john.horne at plymouth.ac.uk
Fri Apr 20 18:51:13 CEST 2012


Hello,

I would like to use the 'xymond_filestore' command to append to files
when receiving information from a 'data' channel.

As far as I can see it cannot do this, but the code in
xymond/xymond_filestore.c shows that 'data' messages are appended to a
temporary file (in Xymon 4.3.7, xymond_filestore line 59). The file mode
is passed as 'a', whereas for other information types (status, notes
etc) it is 'w'.

Unfortunately the temporary file is later renamed as the live file (line
78). Since the temporary file no longer exists, it cannot be appended to
next time (so is created as a new file). The overall effect is that the
information in the data files is overwritten by any new message.

I am not sure why the file mode is 'a' in this instance when the file is
later just renamed. Should perhaps the temporary file be 'copied' to the
live file instead if the mode is 'a'? This would then allow appending to
work, but would also require some mechanism for removing the file
otherwise it might get large.

I'm also unsure how the expiry time is suppose to work. I can see that
it gets set on the file, but what then? Is there some process that later
checks the times and removes 'expired' files?



Thanks,

John.

-- 
John Horne                   Tel: +44 (0)1752 587287
Plymouth University, UK      Fax: +44 (0)1752 587001



More information about the Xymon mailing list