Skip to content

Instantly share code, notes, and snippets.

@Pryz
Created September 13, 2016 00:09
Show Gist options
  • Save Pryz/4ec221a82411d3fb1f6db7b2e909d0d7 to your computer and use it in GitHub Desktop.
Save Pryz/4ec221a82411d3fb1f6db7b2e909d0d7 to your computer and use it in GitHub Desktop.
Sensu_filter_keepalive
// 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