I am trying to write an elast alert for the condition: If there is no log coming from an application for 5 minutes, it should raise an alert. I tried the following rule but it is not working. Is there something I am missing in the syntax or the query?
nextrulename: DevopsNoLogs
index: logstash-*
type: flatline
threshold: 1
timeframe:
seconds: 1
filter:
- query:
query_string:
query: '@module_tag:devops'
alert: my_alerts.AlertManager
labels:
alertsrc: elasticsearch
kafka: 'true'
slack: 'true'
severity: critical
host_impacted: vcmts-all
wikilink: https://etwiki.sys.comcast.net/display/NGAN/DAA+Operations
annotations:
summary: alert is fired if there are no logs in kibana from RLCM Dashboard component for a duration of 5m.