Skip to content

Commit 945dd36

Browse files
committed
Update Globalthreatfeed tests
1 parent c6a3080 commit 945dd36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/using-alerts.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@
6969
https://installer.calicocloud.io/feeds/v1/ips
7070
```
7171

72-
Generate `Suspicious IPs/Domains` alerts by curl those list above. Use `markettrendingcenter.com` and `188.34.185.85` as example:
72+
Generate `Suspicious IPs/Domains` alerts by curl those list above. Use first entry in each threatfeed as example:
7373

7474
```bash
7575
# generate suspicious DNS alerts
76-
kubectl -n dev exec -t netshoot -- sh -c "ping -c1 markettrendingcenter.com"
76+
DOMAIN=$(curl https://installer.calicocloud.io/feeds/v1/domains | awk 'NR==1')
77+
kubectl -n dev exec -t netshoot -- sh -c "ping -c1 $DOMAIN"
7778
7879
# generate suspicious IP alerts
79-
kubectl -n dev exec -t netshoot -- sh -c "ping -c3 188.34.185.85"
80+
IP=$(kubectl get globalnetworksets.crd.projectcalico.org threatfeed.alienvault.ipthreatfeeds -o jsonpath='{.spec.nets[0]}' | sed 's/...$//')
81+
kubectl -n dev exec -t netshoot -- sh -c "ping -c3 $IP"
8082
```
8183

8284
Open `Alerts` view to see all triggered alerts in the cluster. Review the generated alerts.

0 commit comments

Comments
 (0)