dynamic logfile name
Hello!
I have an application that creates everyday a new logfile and I want to monitor it. The manpage for client-local.cfg says:
The file:FILENAME line defines the filename of the file to monitor. As
with the "log:" entries, a filename enclosed in backticks means a
command which will generate the filenames dynamically.
My question is: From what version on does xymon support this feature? I'm currently running 4.2.3. And can someone give me an example for the syntax with backticks?
Thanks in advance!
Oliver
P.S. I hope that this time my message does not count as reply to any previous message.
Log and file work the same way.
file:/usr/bin/sudo ls /var/spool/mqueue/Qf*
file:ls /core.*
-----Original Message----- From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Oliver Sent: Friday, July 25, 2014 3:30 AM To: xymon at xymon.com Subject: [Xymon] dynamic logfile name
Hello!
I have an application that creates everyday a new logfile and I want to monitor it. The manpage for client-local.cfg says:
The file:FILENAME line defines the filename of the file to monitor. As
with the "log:" entries, a filename enclosed in backticks means a
command which will generate the filenames dynamically.
My question is: From what version on does xymon support this feature? I'm currently running 4.2.3. And can someone give me an example for the syntax with backticks?
Thanks in advance!
Oliver
P.S. I hope that this time my message does not count as reply to any previous message.
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Dear Paul,
thank you for the examples. According to this I tried the following lines, but they did not work:
log:ls /path/to/server_logs/$(date +%Y%m%d):102400
file:ls /path/to/server_logs/$(date +%Y%m%d)
Can you tell me please, how to escape the date-command?
Regards
Oliver
Hmm, that looks ok to me.
You could cheat at do:
log:ls /path/to/server_logs/201*:102400
That wouldn't break until 2020.
A couple of things though. After changing client-local.cfg you need to restart xymon. Then it still takes way more time than I think it should for something to show up.
Inevitably, I get impatient and walk away, that's when it starts up, figures out what I did wrong, marks something red and pages the oncall.
Paul.
-----Original Message----- From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Oliver Sent: Tuesday, July 29, 2014 1:21 AM To: xymon at xymon.com Subject: Re: [Xymon] dynamic logfile name
Dear Paul,
thank you for the examples. According to this I tried the following lines, but they did not work:
log:ls /path/to/server_logs/$(date +%Y%m%d):102400
file:ls /path/to/server_logs/$(date +%Y%m%d)
Can you tell me please, how to escape the date-command?
Regards
Oliver
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Thank you for your response! This syntax works absolutely fine, I've had a typo in the path, so it did not work yesterday:
log:ls /path/to/server_logs/$(date +%Y%m%d):102400
file:ls /path/to/server_logs/$(date +%Y%m%d)
participants (2)
-
Paul.Root@centurylink.com
-
r.oliver@web.de