-
-
Save pabit/e4f4d674f881d10cab3d to your computer and use it in GitHub Desktop.
Logstash conf for rsyslog + auditd logs into elasticsearch
This file contains hidden or 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
| input { | |
| syslog = { | |
| type => syslog | |
| port => 514 | |
| } | |
| } | |
| filter { | |
| grok { | |
| type => "auditd" | |
| pattern => [" AUDIT type=%{WORD:audit_type} msg=audit\(%{NUMBER:audit_epoch}:%{NUMBER:audit_coun | |
| ter}\): user pid=%{NUMBER:audit_pid} uid=%{NUMBER:audit_uid} auid=%{NUMBER:audit_audid} subj=%{WORD | |
| :audit_subject} msg=%{GREEDYDATA:audit_message}"] | |
| pattern => [" AUDITLOGIN type=%{WORD:audit_type} msg=audit\(%{NUMBER:audit_epoch}:%{NUMBER:audit | |
| _counter}\): login pid=%{NUMBER:audit_pid} uid=%{NUMBER:audit_uid} old auid=%{NUMBER:old_auid} | |
| new auid=%{NUMBER:new_auid} old ses=%{NUMBER:old_ses} new ses=%{NUMBER:new_ses}"] | |
| } | |
| } | |
| output { | |
| stdout { | |
| codec => rubydebug | |
| debug => true | |
| } | |
| elasticsearch { | |
| embedded => true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment