Advertisement
vhuezo

rabbitmq - ELK

Nov 24th, 2022 (edited)
1,901
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input {
  2.  rabbitmq {
  3.         type => logmtordizucar
  4.         host => "rabbitmq:5672"
  5.         queue => "logmtordizucar"
  6.         heartbeat => 300
  7.         durable => true
  8.         password => "Htc2021!"
  9.         user => "htc"
  10.     }
  11. }
  12.  
  13. filter {
  14.   if [type]=="logmtordizucar"{
  15.       ruby {
  16.             code => 'event.set("data", event.get("data").to_s)'
  17.      }
  18.   }
  19. }
  20.  
  21. filter {
  22.   if [type]=="logmtordizucar"{
  23.       ruby {
  24.             code => 'event.set("attributes", event.get("attributes").to_s)'
  25.      }
  26.   }
  27. }
  28.  
  29. filter {
  30.   if [type]=="logmtordizucar"{
  31.       ruby {
  32.             code => 'event.set("detail", event.get("detail").to_s)'
  33.      }
  34.   }
  35. }
  36.  
  37. filter {
  38.   if [type]=="logmtordizucar"{
  39.       date {
  40.           match => [ "creationDate", "UNIX_MS" ]
  41.           target => "creationDate"
  42.       }
  43.   }
  44. }
  45.  
  46. filter {
  47.   if [type]=="logmtordizucar"{
  48.       mutate {
  49.           convert => {
  50.              "sequence" => "integer"
  51.         }
  52.      }
  53.   }
  54. }
  55.  
  56. output {
  57.   if [type]=="logmtordizucar"{
  58.     elasticsearch {
  59.         template_name => "logmtordizucar"
  60.         hosts => ["elasticsearch:9200"]
  61.         index =>  "logmtordizucar-%{+YYYY.MM.dd}"
  62.     }
  63.   }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement