How to do port based filtering in rsyslog
Issue
- rsyslog instance that is running on multiple ports listening for both TCP and UDP. Our requirement is that the servers connecting to port 514 should have their logs stored in something like
/logbase/port-514/%hostname. - want to set a separate log file for logging messages received on different ports.
Environment
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
rsyslog
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
