Skip to content

Instantly share code, notes, and snippets.

@DecisionNerd
Created December 5, 2015 05:33
Show Gist options
  • Save DecisionNerd/8c4ac82ca296eb7f92ea to your computer and use it in GitHub Desktop.
Save DecisionNerd/8c4ac82ca296eb7f92ea to your computer and use it in GitHub Desktop.
input {
http_poller {
# List of urls to hit
# URLs can either have a simple format for a get request
# Or use more complex HTTP features
urls => {
BWI => "http://services.faa.gov/airport/status/BWI?format=application/json"
IAD => "http://services.faa.gov/airport/status/IAD?format=application/json"
DCA => "http://services.faa.gov/airport/status/DCA?format=application/json"
}
# Maximum amount of time to wait for a request to complete
request_timeout => 30
# How far apart requests should be
interval => 60
# Decode the results as JSON
codec => "json"
# Store metadata about the request in this key
metadata_target => "http_poller_metadata"
}
}
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment