Created
September 13, 2016 00:09
-
-
Save Pryz/4ec221a82411d3fb1f6db7b2e909d0d7 to your computer and use it in GitHub Desktop.
Sensu_filter_keepalive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The filter ! | |
{ | |
"filters": { | |
"after_5_occurrences": { | |
"attributes": { | |
"occurrences": "eval: value > 5" | |
} | |
} | |
} | |
} | |
// The client conf | |
{ | |
"client": { | |
"name": "blah", | |
"address": "172.18.3.64", | |
"subscriptions": [], | |
"bind": "127.0.0.1", | |
"port": "3030", | |
"safe_mode": false, | |
"keepalive": { | |
"enable_deprecated_filtering": false, | |
"handlers": [ | |
"handle_me" | |
], | |
"thresholds": { | |
"warning": 30, | |
"critical": 60 | |
}, | |
"filters": [ | |
"after_5_occurrences" | |
] | |
}, | |
... | |
} | |
// The handler | |
{ | |
"handlers": { | |
"handle_me": { | |
"command": "/etc/sensu/handlers/handle_me.rb", | |
"type": "pipe", | |
"filters": [ | |
"after_5_occurrences" | |
], | |
"severities": [ | |
"ok", | |
"warning", | |
"critical", | |
"unknown" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment