Last active
August 29, 2015 14:07
-
-
Save VerosK/73e553897d0d33bd1c17 to your computer and use it in GitHub Desktop.
nxlog - send input from file to syslog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Extension _syslog> | |
Module xm_syslog | |
</Extension> | |
<Input in1> | |
Module im_file | |
File "/tmp/input.txt" | |
Exec $message = $raw_event; $SourceName = file_name(); | |
Exec if $SourceName =~ /(\/.*\/)([^\/]*)$/ $SourceName = $2; | |
Exec if $SourceName =~ /(.*\\.*\\)([^\\]*)$/ $SourceName = $2; | |
</Input> | |
<Output fileout1> | |
Module om_file | |
File "/tmp/output.txt" | |
# Exec if $Message =~ /error/ $SeverityValue = syslog_severity_value("error"); | |
Exec to_syslog_bsd(); | |
</Output> | |
<Route 1> | |
Path in1 => fileout1 | |
</Route> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment