# Elastalert spike rule not getting any hits

**URL:** <https://discuss.elastic.co/t/elastalert-spike-rule-not-getting-any-hits/266306>\
**Category:** Elasticsearch\
**Created:** [March 5, 2021, 12:57am UTC](https://discuss.elastic.co/t/elastalert-spike-rule-not-getting-any-hits/266306 "2021-03-05T00:57:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhanu\_Praveen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhanu_praveen/32/60395_2.png) [@Bhanu\_Praveen](https://discuss.elastic.co/u/Bhanu_Praveen)\
**Post date:** [March 5, 2021, 12:57am UTC](https://discuss.elastic.co/t/elastalert-spike-rule-not-getting-any-hits/266306/1 "2021-03-05T00:57:27Z")

</div>

Hello,

I have a scenario to identify if any spike on incoming work items. There is a huge spike around 57000 for works arrived when compared to a max range of 27000 last 3 months as shown below.

 ![elastalert](https://us1.discourse-cdn.com/elastic/original/3X/2/9/292be090e14d807de2443b876276d9941baa1304.jpeg)

I tried to use a spike rule with below settings:

```auto
 es_host: xxxxxxx
 es_port: 9200
 name: Event spike
 type: spike
 index: work-2021-02
 threshold_cur: 1
 #threshold_ref: 0
 timeframe:
 hours: 2
 spike_height: 2
 spike_type: "up"
 filter:

 query:
 query_string:
 query: "(METRIC_TYPE:WORK_ARRIVED) AND (not WORK_TYPE:Integration Error) AND (WORK_TYPE : TT-214)"
 type:
 value: "some_doc_type"
 alert:
 "email"
 email:
 xxxxxxxxxxxxxxxx.com

```

Tested rule with below command:

`elastalert-test-rule --days 25 example_rules/elastspikerule.yaml`

If i test the rule with same time range when the spike occurred, still i don't get any hits. Kindly let me know if my configurations are fine?

Thanks..

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2021, 12:57am UTC](https://discuss.elastic.co/t/elastalert-spike-rule-not-getting-any-hits/266306/2 "2021-04-02T00:57:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
