Hi,
I have created 2 separate rule files , which are as follows:-
//--------------------------------------------------------
realert:
minutes: 5
from_addr: test@email.com
es_host: xx.xx.xxx.xx
index: topbeat-*
smtp_host: ismtp.corp.company.com
type: frequency
es_port: 9200
filter:
- range:
mem.used_p:
from: 0.70
to: 1.0
- term:
beat.hostname: xxxxx
timeframe:
minutes: 30
alert: email
name: 9__server__xxxxx__mem.used_p__0.70__30
email: ["user@email.com"]
num_events: 1
//------------------------------------------------------------
//------------------------------------------------------------
realert:
minutes: 5
from_addr: test@email.com
es_host: xx.xx.xxx.xx
index: packetbeat-*
smtp_host: ismtp.corp.company.com
type: frequency
es_port: 9200
filter:
- term:
http.code: 404
- term:
beat.hostname: yyyyy
timeframe:
minutes: 30
alert: email
name: 25__app__yyyyy__http.code__404__1__30
email: ["user@email.com"]
num_events: 1
//------------------------------------------------------------
Both rule files are generating emails as per their definition.
Is there any way to have these two rule files as a single rule file.
where I might need to define, index:topbeat-,packetbeat-
Then in that case how I need to write filters, so that mem.used_p is queried against topbeat-* for server xxxxx and http.code is queried against packetbeat-* for server yyyyy. ???