Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input {
  2.   http_poller {
  3.     urls => {
  4.       payara => {
  5.         method => get
  6.         url => "http://localhost:8080/metrics/base"
  7.         headers => {
  8.           Accept => "application/json"
  9.         }
  10.       }
  11.     }
  12.     request_timeout => 60
  13.     schedule => {cron => "* * * * * UTC"}
  14.   }
  15. }
  16.  
  17. filter {
  18.   date {
  19.     match => [
  20.       "timestamp", "ISO8601"
  21.     ]
  22.     target => "@timestamp"
  23.   }
  24.   #grok {
  25.   #  match => {"message" = > "^%{namespace}\:%{key}\ %{value}"}
  26.   #}
  27.   #drop {
  28.   #  remove_field => [ "@timestamp", "timestamp" ]
  29.   #}
  30. }
  31.  
  32.   output {
  33.     influxdb {
  34.       host => "localhost"
  35.       port => 8086
  36.       db => "grafanadb"
  37.       user => "admin"
  38.       password => "12345"
  39.       #codec        => json
  40.       #exclude_fields => ["@timestamp"]
  41.       #use_event_fields_for_data_points => false
  42.       #data_points => {}
  43.       # codec => line {
  44.       #  format => "%{message}"
  45.       #}
  46.       use_event_fields_for_data_points => true
  47.       #exclude_fields => ["@timestamp", "@version", "sequence", "message", "type"]
  48.       data_points => {
  49.       }
  50.     }
  51.     #stdout {
  52.     #  codec => rubydebug
  53.     #}
  54.     stdout {
  55.       codec => rubydebug
  56.     }
  57.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement