sentinl: email_html action raises an error
Using the same watcher, I define 2 actions : one email
and one email_html
with nearly the same configuration.
I receive well the email
one, but not the email_html
one.
When looking at logs, I can see this error log :
{"type":"log","@timestamp":"2017-01-17T14:50:00Z","tags":["error","Sentinl"],"pid":11701,"message":"An error occurred while executing the watch: TypeError: Cannot read property 'active' of undefined"}
Is there a special entry to activate in kibana.yml
?
I use Kibana 4.6.3.
Here’s my kibana.yml
sentinl configuration :
sentinl:
es:
timefield: '@timestamp'
default_index: watcher
type: watch
alarm_index: watcher_alarms
sentinl:
history: 20
results: 50
settings:
email:
active: true
host: localhost
ssl: false
report:
active: true
tmp_path: /tmp/
Here’s my watcher :
{
"_index": "watcher",
"_type": "watch",
"_id": "test_watch_fba",
"_score": 1,
"_source": {
"disable": false,
"trigger": {
"schedule": {
"later": "every 1 day at 2:27 pm"
}
},
"input": {
"search": {
"request": {
"index": "<logstash-{now-1d/d}>,<logstash-{now-2d/d}>",
"body": {
"size": 0,
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"range": {
"@timestamp": {
"from": "now-1d/d",
"to": "now-1d/d",
"time_zone": "Europe/Paris"
}
}
}
}
}
}
}
}
},
"condition": {
"script": {
"script": "payload.hits.total > 0"
}
},
"transform": {},
"actions": {
"send_email_fba": {
"email": {
"to": "fba@mycompany.com",
"from": "kibana@mycompany.com",
"subject": "SENTINL TEST NOT HTML",
"priority": "high",
"body": "Total Hits: {{ payload.hits.total }}",
"stateless": false
}
},
"send_email_html_fba": {
"email_html": {
"to": "fba@mycompany.com",
"from": "kibana@mycompany.com",
"subject": "SENTINL TEST HTML",
"priority": "high",
"body": "Total Hits: {{ payload.hits.total }}",
"html": "<p>Total Hits: {{ payload.hits.total }}</p>",
"stateless": false
}
}
}
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- correct invalid config pointer resolves issue #93 on sentinl public — committed to sentinl/sentinl by lmangani 7 years ago
@lmangani As the fix is easy to do, I tried the fix on my sentinl installation, and it works great now !