Search::ESsearcher::Templates::syslog - Provides postfix support for essearcher.
Version 0.1.1
This uses a logstash configuration below.
input { syslog { host => "10.10.10.10" port => 11514 type => "syslog" } } filter { } output { if [type] == "syslog" { elasticsearch { hosts => [ "127.0.0.1:9200" ] } } }
The important bit is "type" being set to "syslog". If that is not used, use the command line options field and fieldv.
Install https://github.com/whyscream/postfix-grok-patterns for pulling apart the postfix messages. These files are included with this as well. You will likely not want to use 51-filter-postfix-aggregate.conf as that is a bit buggy.
The syslog server.
The search is done with .keyword appended to the field name.
Does not run the it through aonHost.
The source server sending to the syslog server.
The number of items to return.
The PID that sent the message.
Date greater than.
Date greater than or equal to.
Date less than.
Date less than or equal to.
Messages to match.
The term field to use for matching them all.
The value of the term field to matching them all.
Search based on the message ID.
The from address to search for.
The to address to search for.
The original to address to search for.
Search for rejected messages, NOQUEUE.
The client IP to search for.
The client hostname to search for.
Search using SMTP status codes.
Do not display the country code for the client IP.
Do not display the region code for the client IP.
Do not display the city name for the client IP.
Do not display the postal code for the client IP.
Show alias warnings.
Show the parsed out /postfix\_.*/ keys.
Do not show the message.
Show the syslog program name as well.
Show the syslog PID as well.
, OR + AND ! NOT
A list seperated by any of those will be transformed
These may be used with program, facility, pid, or host.
example: --program postfix,spamd results: postfix OR spamd
A list of hosts seperated by any of those will be transformed. A host name should always end in a period unless it is a FQDN.
These may be used with host and src.
example: --src foo.,mail.bar.
results: /foo./ OR /mail.bar./
date
/^-/ appends "now" to it. So "-5m" becomes "now-5m".
/^u\:/ takes what is after ":" and uses Time::ParseDate to convert it to a unix time value.
Any thing not matching maching any of the above will just be passed on.
To install Search::ESsearcher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::ESsearcher
CPAN shell
perl -MCPAN -e shell install Search::ESsearcher
For more information on module installation, please visit the detailed CPAN module installation guide.