Skip to content

Generating Syslog Configurations with syslogify

As of late, I have needed to generate syslog configurations to monitors log files multiple times. A great example would be generating the syslog configurations for vCAC log files. To save time, I created a quick script to do the work for me. I thought others may find this valuable and wanted to share.

I call the script syslogify and it takes a list of files and generates a syslog configuration for either Linux (rsyslog or syslog-ng) or Windows (datagram). The output can be printed to the screen or in the case of Linux, appended to an existing syslog configuration file.

As an example, let’s say I have a file with the following contents:

I could generate a syslog configuration for the VCO logs by running:

The output would be:

I could generate a syslog configuration for the vCAC logs by running:

The output would be:

© 2014, Steve Flanders. All rights reserved.

Published inSystem Administration

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *