Configure rsyslog to ingest logfile with Dynamic file name

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Configure rsyslog to ingest logfile with Dynamic file name

Post by Sampath.Basireddy »

Hello There,

Can we use "/apps/tomcat/logs/gc-`date +%m%d%Y-%H%M`.log" to input a log file which gets created daily with date and time in the file name using rsyslog to ingest to NLS?


Please suggest.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Configure rsyslog to ingest logfile with Dynamic file na

Post by cdienger »

rsyslog requires an absolute name so it doesn't appear possible. Per https://www.rsyslog.com/doc/v8-stable/c ... .html#file
The file being monitored. So far, this must be an absolute name (no macros or templates). Note that wildcards are supported at the file name level (see WildCards below for more details).
An alternative would be to script something that takes the names into account like that and use the shipper.py script to transfer it. Point your browser to https://nls_ip/nagioslogserver/configure/source/import for more info on the shipper script.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked