How to set up file monitoring for multiple files?

Last Updated: Jan 25, 2016 10:39AM PST
You may want to monitor additional files after you have setup Linux File Monitoring, for single file.  You could do so by using the below structure over and over again for each additional file. Make sure that the $InputFileStateFile is unique for each file. If the files are from the same app you can use the same $InputFileTag. Add below section under your .conf file as per your requirement and restart rsyslog after saving the changes:

# Input for FILE1
$InputFileName /FILE1
$InputFileTag APPNAME1
$InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled
$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor

# Input for FILE2
$InputFileName /FILE2
$InputFileTag APPNAME2
$InputFileStateFile stat-APPNAME2 #this must be unique for each file being polled
$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
:
:
Continue adding all your files using this structure

 
logglyassistly@zoho.com
https://cdn.desk.com/
false
@loggly
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete