How do I exclude files with "snapshot" in the end of the filename?:
SIP_Server.20190512_020807_602.snapshot.log
This the standard name format for the log files I want look like this:
SIP_Server.20190512_020807_800.log
<Input sip_p>
Module im_file
File 'E:\Logs\SIP_Server.*.log'
InputType sip_multiline_header
SavePos FALSE
</Input>
how to exclude filenames
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: how to exclude filenames
I believe you can use something like this
Code: Select all
<Input sip_p>
Module im_file
File 'E:\Logs\SIP_Server.*.log'
$FileName = file_name();
if $FileName =~ /.*snapshot.*/s drop();
InputType sip_multiline_header
SavePos FALSE
</Input>