Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.55 KB | None | 0 0
  1. input { stdin { codec => "json" } }
  2. filter {
  3. if [log_source] {
  4.     mutate {
  5.       copy => { "log_source" => "log_source_no_periods" }
  6.     }
  7.     mutate {
  8.       gsub => [ "log_source_no_periods", "\.", "_" ]
  9.     }
  10.   }
  11. }
  12. output {
  13.   if [log_source_no_periods] {
  14.     statsd {
  15.       protocol => "${STATSD_INTERFACE}"
  16.       sender => "%{client}"
  17.       increment => "%{log_source_no_periods}-%{type}"
  18.     }
  19.   } else {
  20.     statsd {
  21.       protocol => "${STATSD_INTERFACE}"
  22.       sender => "%{client}"
  23.       increment => "unknown-%{type}"
  24.     }
  25.   }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement