TitleLogwatch: Find solution to handle logfiles with dynamic names
ComponentChecks & Agents

We have a requirement from our developers to monitor log files in the format: /path/logfile.20120719 with the date changing every day. To do this, we added code to the parse and change the name in the config file: # cat /etc/check_mk/logwatch.cfg /var/log/test.DATE C test Now to interpret it, we changed the mk_logwatch [root@temolate2 ~]# diff mk_logwatch.newest /usr/lib/check_mk_agent/plugins/mk_logwatch 30,35d29 < from datetime import date <"%Y%m%d") < yyear ="%Y") < year ="%y") < month ="%m") < day ="%d") 278,284d270 < gsave = glob < glob=glob.replace('DATE',dd) < glob=glob.replace('YYYY',yyear) < glob=glob.replace('YY',year) < glob=glob.replace('MM',month) < glob=glob.replace('DD',day) < 294c280 < process_logfile(logfile, patterns, gsave) --- > process_logfile(logfile, patterns) Could you please add this feature to the next version of the logwatch plugin. Thanks! Best Regards, Roman Lazarev Information Technology Division