Hi Friends need help on elastalert
I wrote one rule for cpu sike alert
the monitored Mule CE ESB.
es_host: elastsearch-hostname
es_port: 9200
name: CPU spike
type: spike
index: host_stats*
threshold: 1
timeframe:
minutes: 1
spike_height: 1
spike_type: "up"
filter:
- query:
query_string:
query: 'contgroup: "mygroup" AND measure: "ContCpuUsed" AND value: >1.00'
#- type:
#value: "log"
#doc_type: "json_platform_metrics"
realert:
minutes: 0
alert:
- "email"
email: -
"testing@gmail.com"
smtp_host: "smtp.gmail.com"
smtp_port: 587
smtp:ssl: true
from_addr: "monitoring@gmail.com"
smtp_auth_file: '/opt/elastalert/smtp_auth_file.yaml'
When i am running this :-
python elastalert.elastalert --verbose --config config.yaml --rule spike.yaml
i am getting this 0 / 0 hits
INFO:elastalert:Queried rule Frequency Alert from 2016-09-08 17:05 UTC to 2016-09-08 17:50 UTC: 0 / 0 hits
But when i am doing elastalert-test-rule spike.yaml
i am getting below and its showing hits there
INFO:elastalert:Queried rule CPU spike from 2016-09-08 16:43 UTC to 2016-09-08 17:28 UTC: 282 / 84 hits
I am not getting alert email can anyone help me on this regard please