forked from sentinl/sentinl
-
Notifications
You must be signed in to change notification settings - Fork 0
KAAE Watcher Actions
Lorenzo Mangani edited this page Sep 11, 2016
·
9 revisions
Currently supported "actions" for KaaE watchers:
Store Query results and message to Elasticsearch index
"elastic" : {
"priority" : "DEBUG",
"message" : "Avg {{payload.aggregations.avg.value}} measurements in 5 minutes"
}
Output Query results and message to Console
"console" : {
"priority" : "DEBUG",
"message" : "Average {{payload.aggregations.avg.value}}"
}
Send Query results and message via Email/SMTP
- Requires action settings in
/etc/kaae.json
"email" : {
"to" : "root@localhost",
"from" : "kaae@localhost",
"subject" : "Alarm Title",
"priority" : "high",
"body" : "Series Alarm {{ payload._id}}: {{payload.hits.total}}",
"stateless" : false
}
Deliver message to remote web API
"webhook" : {
"method" : "POST",
"host" : "remote.server",
"port" : 9200,
"path": ":/{{payload.watcher_id}",
"body" : "{{payload.watcher_id}}:{{payload.hits.total}}"
}
Delivery Message to #Slack channel
- Requires action settings in
/etc/kaae.json
"slack" : {
"channel": "#channel",
"message" : "Series Alarm {{ payload._id}}: {{payload.hits.total}}",
"stateless" : false
}
Take a website Snapshot using PhantomJS and send it via Email/SMTP
- Requires email settings in
/etc/kaae.json
- Requires Pageres/PhantomJS:
npm install -g pageres
"report" : {
"to" : "root@localhost",
"from" : "kaae@localhost",
"subject" : "Report Title",
"priority" : "high",
"body" : "Series Report {{ payload._id}}: {{payload.hits.total}}",
"snapshot" : {
"res" : "1280,900",
"url" : "http://127.0.0.1/app/kibana#/dashboard/Alerts",
"path" : "/tmp/",
"params" : {
"username" : "username",
"password" : "password",
"delay" : 5000,
"crop" : false
}
},
"stateless" : false
}