Skip to content

Instantly share code, notes, and snippets.

Buzut

View GitHub Profile
@Buzut
Buzut / checks.json
Last active Jul 21, 2016
Sensu servers metrics alert
View checks.json
{
"checks": {
"serverAlert": {
"command": "/etc/sensu/plugins/serverMetricsAlert.js",
"interval": 60,
"handlers": ["default"],
"subscribers": ["monit"]
}
}
@Buzut
Buzut / httpd.sh
Last active Mar 29, 2019
Various simple Sensu checks
View httpd.sh
#!/bin/bash
# check if given host returns HTTP status 200
# usage: httpd.sh [host:port]
# ex: httpd localhost:3000
# if no arguments, default to localhost:80
if [ -z "$1" ]
then
httpd=`curl -s -D - localhost -o /dev/null | sed -n '/HTTP/p'`
@Buzut
Buzut / handlers.json
Last active Jun 30, 2017
Sensu handler for InfluxDB
View handlers.json
{
"handlers": {
"influxdb": {
"type": "pipe",
"comman": "/etc/sensu/handlers/influx.js"
}
}
}
You can’t perform that action at this time.