Skip to content

Instantly share code, notes, and snippets.

@piavlo
Created June 13, 2013 15:28
Show Gist options
  • Save piavlo/5774621 to your computer and use it in GitHub Desktop.
Save piavlo/5774621 to your computer and use it in GitHub Desktop.
how to set sensu check defaults and override them per client as needed instead of defining whole check on client side , so ultimately this way the only checks than need to be defined on client side are standalone checks
/etc/sensu/conf.d/checks/thresholds/logstash-elasticsearch.json
{
"client": {
"params": {
"cpu": {
"warning": 80,
"critical": 90
},
"iowait": {
"warning": 50,
"critical": 70
}
}
}
}
/etc/sensu/conf.d/checks/cpu.json
{
"checks": {
"check_cpu": {
"command": "/etc/sensu/plugins/check-cpu.rb -w :::params.cpu.warning|70::: -c :::params.cpu.critical|90::: --sleep 30",
"interval": 60,
"occurrences": 3,
"subscribers": [ "common" ],
"handlers": [ "default" ]
}
}
}
/etc/sensu/conf.d/checks/iowait.json
{
"checks": {
"check_iowait": {
"command": "/etc/sensu/plugins/check-cpu.rb -w :::params.iowait.warning|30::: -c :::params.iowait.warning|50::: --iowait --sleep 30",
"interval": 60,
"occurrences": 3,
"subscribers": [ "logstash-elasticsearch", "graphite", "mysql" ],
"handlers": [ "default" ]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment