--- /dev/null
+alert http any any -> any any (flow:established,to_server; http.host; datajson:isset,badhost,type string,load hosts.json,key bad_host,json_key host, array_key threat; ip.src; datajson:isset,src_ip,type ip,load src.json,key src_ip,json_key ip; sid:1;)
+
+alert http any any -> any any (flow:established,to_server; http.host; datajson:isset,dbadhost,type string,load hosts-direct.json,key dbad_host,json_key host; ip.src; datajson:isset,src_ip,type ip,load src.json,key src_ip,json_key ip; sid:2;)
+
+
+alert http any any -> any any (flow:established,to_server; http.host; datajson:isset,nbadhost,type string,load hosts-nested.json,key nbad_host,json_key host, array_key info.threat; ip.src; datajson:isset,src_ip,type ip,load src.json,key src_ip,json_key ip; sid:3;)
--- /dev/null
+requires:
+ features:
+ - HAVE_LIBJANSSON
+ files:
+ - src/datasets.c
+
+args:
+ - -k none --set datasets.enabled=yes
+
+checks:
+ - filter:
+ count: 3
+ match:
+ event_type: alert
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.bad_host.year: 2005
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 2
+ alert.extra.src_ip.test: success
+ alert.extra.dbad_host.year: 2005
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 3
+ alert.extra.src_ip.test: success
+ alert.extra.nbad_host.year: 2005