Advertisement
Guest User

Untitled

a guest
Jul 21st, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. [root@JLM-DB-230 conf.d]# cat test.conf
  2. input{
  3. beats{
  4. port => 5044
  5. }
  6. }
  7. filter {
  8. mutate {
  9. add_tag => [ "insidefilter" ]
  10. }
  11.  
  12. if [log][file][path] =~ "commands.log" {
  13. grok{
  14. match => { "message" => "\[(%{TIMESTAMP_ISO8601:sys_timestamp})\]\s(?<Hostname>[0-9a-zA-Z_-]+)\s(?<Logged as>[0-9a-zA-Z_-]+)\:USER=(?<User>[0-9a-zA-Z_-]+)\sPWD=(?<Directory>[0-9a-zA-Z_/-]+)\sPID=\[(?<PID>[0-9]+)\]\sCMD=\"(?<Command>.*)\"\sExit=\[(?<Exit>[0-9]+)\]\sCONNECTION=(?<Connetion>.*)"
  15. }
  16. }
  17. }
  18. }
  19. output{
  20. elasticsearch {
  21. # manage_template => false
  22. hosts => ["localhost:9200"]
  23. index => "cleandata"
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement