Hi
I’m trying to figure out how to order scenarios queue and skip unnecessary ones.
For example: I’m running crowdsec on OPNsense router and there is scenario which looks into packet filter logs (firewallservices/pf-scan-multi_ports)
It has this filter:
filter: "evt.Meta.log_type == 'pf_drop' && evt.Meta.service == 'tcp'"
I want to leave this filter (and scenario) alone and make a copy this scenario file into new file (and new name) → “aaa/a-pf-scan-multi_ports_mod”, and mod for my needs, by modifying:
filter: "evt.Meta.log_type == 'pf_drop' && evt.Parsed.dst_ip == "x.x.x.x" &&( evt.Meta.service == 'tcp' || evt.Meta.service == 'udp')"
blackhole: 60m
reprocess: false
The purpose of modified (a-pf-scan-multi_ports_mod) scenario is to make blackhole time longer for specific destination IP (I have plan different scenarios for different servers in regards to pf-scan)
The problem is, that both scenarios are summoned (the modified one and the original one), but I want to summon the modified one first (because it is more specific and more conditions has to be fulfilled ) and if the “filter” conditions wouldn’t be met, then leave and summon next one, the default original one)
The cscli explain shows that both will be summoned.
├ Scenarios
├ 🟢 aaaa/pf-scan-multi_ports
└ 🟢 firewallservices/pf-scan-multi_ports
And both were summoned indeed.
How to make this possible?