- rotate log files based on size.
- rotate log files based on size using event fields- such as $Hostname from Syslog
- rotate log files based on size and schedule.
I CANNOT rotate log files based on size and schedule using event fields ! It seems that the Schedule component does not like references to fields.
At end of tether, please help.
ERROR invalid om_file keyword: $newfilepath
$newfilepath = "D:/Test/" + $Hostname + "/" + $SourceName + "/"
$currfilename = strftime(now(), "%Y%m%d") + ".current"
File $newfilepath + $currfilename
# Check the size of our log file every minute and rotate if it is larger than 1Mb
Every 60 sec
Exec if (out->file_size() >= 1M) \
$newfilename = $newfilepath + strftime(now(), "%Y%m%dT%H%M%S") + ".s"); \
Path in => out
Thanks in advance. Paul