Amey via rsyslog wrote:

I have a requirement to write an input query which will fetch the
nginx log file but the file name keeps changing every week as it's in
k8s and after every maintenance on weekend, the pod gets allocated to
a new node.

my current input query in ConfigMap for rsyslog server =
---------------------------------------------
input(type="imtcp" port="514")
input(type="imfile"
File="/var/log/containers/*.log"
Tag="dynamic-log"
StateFile="dynamic-state"
Severity="info"
Facility="local0")
---------------------------------------------

I want to make following log format dynamic in above query =
nginx-proxy-pool-cloud-poc-2-wjaabcdvnm_kube-system_nginx-proxy-a270593024771d7ce65245f540c775c9bf330c6538696f2c87b204c5a96e7443.log

Few parts remain constant in the above log.
I tried with nginx-proxy-*.log but that isn't writing log properly and
showing errors for a couple of modules.

tell us more, that seems like it should work. what is the error you are getting?

David Lang
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to