Skip to content

KAAE Watcher Actions

Lorenzo Mangani edited this page Sep 11, 2016 · 9 revisions

Watcher Actions

Currently supported "actions" for KaaE watchers:

Elasticsearch Index

Store Query results and message to Elasticsearch index

  "elastic" : {
	   "priority" : "DEBUG",
	   "message" : "Avg {{payload.aggregations.avg.value}} measurements in 5 minutes"
	   }

Console

Output Query results and message to Console

   "console" : {
	  "priority" : "DEBUG",
	  "message" : "Average {{payload.aggregations.avg.value}}"
	  }

Email/SMTP

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
	   }

webHook

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}}" 
	  }

Slack

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
	  }

Report (BETA)

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
        }