Hello,
I monitor the log file last modification time.
Everything works fine, I have the item key:
vfs.file.time[/var/log/external/2021/billing,modify]
And trigger expression:
fuzzytime(/Logserver/vfs.file.time[/var/log/external/2021/billing,modify],2820)=0
But I would like to make some modification
in syslog-ng I would like to set the file name to be changed every month and year
Currently I have this:
I want to have this:
But I have no idea how to monitor it in Zabbix
I monitor the log file last modification time.
Everything works fine, I have the item key:
vfs.file.time[/var/log/external/2021/billing,modify]
And trigger expression:
fuzzytime(/Logserver/vfs.file.time[/var/log/external/2021/billing,modify],2820)=0
But I would like to make some modification
in syslog-ng I would like to set the file name to be changed every month and year
Currently I have this:
Code:
source ttyS0 { file ("/dev/ttyS0"); };
destination ttyS0 { file("/var/log/external/2021/billing"); };
log { source(ttyS0); destination(ttyS0); };
Code:
source ttyS0 { file ("/dev/ttyS0"); };
#destination ttyS0 { file("/var/log/external/$YEAR/billing-$YEAR-$MONTH"); };
log { source(ttyS0); destination(ttyS0); };
But I have no idea how to monitor it in Zabbix
Find a way to keep "year" and "month" in user macros and update them every month. That's pretty much your only option here...
Comment