Skip to content

Instantly share code, notes, and snippets.

View lcostantini's full-sized avatar

Leandro Costantini lcostantini

  • Amsterdam, Netherlands
View GitHub Profile
@lcostantini
lcostantini / bluemix_logstash.conf
Created March 17, 2016 15:10
Configuration file to run Logstash in Bluemix.
input {
http_poller {
urls => {
"bluemix-health-check" => "http://anomaly-detection.mybluemix.net/health-check"
}
automatic_retries => 0
interval => 10
request_timeout => 8
metadata_target => http_poller_metadata
tags => anomaly
@lcostantini
lcostantini / localhost_logstash.conf
Created March 17, 2016 15:05
Configuration file for Logstash to run locally.
input {
http_poller {
# Is a hash with a list of URLs.
urls => {
"localhost-health-check" => "http://localhost:9292/health-check"
}
# Default is 1, but I don't want to make any retry.
automatic_retries => 0
# Check the endpoint in URLs every 10s.
interval => 10
@lcostantini
lcostantini / slow_requests_watch
Created March 17, 2016 15:04
Watcher configuration to detect one or more slow requests.
{
"trigger": {
"schedule": {
"interval": "20s"
}
},
"input": {
"search": {
"request": {
"indices": ["logstash-*"],
@lcostantini
lcostantini / 500_watch
Created March 17, 2016 15:03
Watcher configuration to detect two or more HTTP 500 consecutive
{
"trigger": {
"schedule": {
"interval": "20s"
}
},
"input": {
"search": {
"request": {
"indices": ["logstash-*"],