Skip to content

Instantly share code, notes, and snippets.

@nstielau
Last active April 24, 2019 16:35
Show Gist options
  • Save nstielau/6096392 to your computer and use it in GitHub Desktop.
Save nstielau/6096392 to your computer and use it in GitHub Desktop.
Example of Sensu remediation.
{
"checks": {
"check_something": {
"command": "ps aux | grep cron",
"interval": 60,
"subscribers": ["application_server"],
"handlers": ["debug", "irc", "remediator"],
"remediation": {
"light_remediation": {
"occurrences": [1, 2],
"severities": [1]
},
"medium_remediation": {
"occurrences": ["3-10"],
"severities": [1]
},
"heavy_remediation": {
"occurrences": ["1+"],
"severities": [2]
}
}
},
"light_remediation": {
"command": "/bin/something",
"subscribers": [],
"handlers": ["debug", "irc"],
"publish": false,
},
"medium_remediation": {
"command": "/bin/something_else",
"subscribers": [],
"handlers": ["debug", "irc"],
"publish": false,
},
"heavy_remediation": {
"command": "sudo reboot",
"subscribers": [],
"handlers": ["debug", "irc"],
"publish": false,
}
}
}
@oba11
Copy link

oba11 commented Oct 28, 2014

Thanks alot @seth-paxton, the reason why its been failing was because of the subscriber pointing to the client name. I just added it and worked flawlessly.
Thanks alot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment