# How to create sequence rules?

**URL:** <https://discuss.elastic.co/t/how-to-create-sequence-rules/335390>\
**Category:** Elastic Security\
**Created:** [June 7, 2023, 4:39am UTC](https://discuss.elastic.co/t/how-to-create-sequence-rules/335390 "2023-06-07T04:39:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VellayLoket](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@VellayLoket](https://discuss.elastic.co/u/VellayLoket)\
**Post date:** [June 7, 2023, 4:39am UTC](https://discuss.elastic.co/t/how-to-create-sequence-rules/335390/1 "2023-06-07T04:39:52Z")

</div>

So, i want to create the sequence rules to aggregate the same events to one alert.  
For example i have event from IDS system where i have fields like:  
client.ip  
cs1 - the category name ("malware activity" or smth like this)

So, how to sequense event with the same client.ip and cs1 fileds to one alert?  
I had try this, but i got error:

```auto
sequence by client.ip
[detect where cs1 == "trojan-activity"]

```

line 2:40: mismatched input '' expecting '['

---

<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:** [July 5, 2023, 4:40am UTC](https://discuss.elastic.co/t/how-to-create-sequence-rules/335390/2 "2023-07-05T04:40:32Z")

</div>

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