On Tue, March 29, 2016 8:11 pm, Colin Coe wrote:
Hi all
I'm trying to monitor a couple of files on a bunch of Windows clients.
/etc/xymon/analysis.cfg HOST=%winclnt.* FILE C:\users\user.domain\Documents\Timing.log SIZE>500M yellow FILE C:\users\user.domain\Documents\Timing.log SIZE>1G red FILE C:\users\user.domain\Documents\Trace.log SIZE>500M yellow FILE C:\users\user.domain\Documents\Trace.log SIZE>1G red
/etc/xymon/client-local.cfg file:C:\users\user.domain\Documents\Timing.log SIZE>1G red file:C:\users\user.domain\Documents\Trace.log SIZE>500M yellow
Looking at the man page for client-local.cfg, its colon (:) delimited. How do I specify the file path for Windows clients?
The fields in client-local.cfg (once the appropriate [section] is found) are, strictly speaking, arbitrary and interpreted by the client, so this, in the immediate case, would be a WinPS question. As you've noted, the analysis.cfg section is what's used back in xymond_client, which is space-delimited and can do quote-wrapping or regular expressions.
I think a quoted string (' ... ') might be the best syntax addition here (for both logfetch and WinPS). Adding normal escapability using the expected method of backslashes would IMO make the Windows path even worse...
Another option is to use exec commands to 'ECHO filename' (or DIR /B),
or a glob-like wildcard, but I'm not certain if WinPS supports either.
HTH, -jc