Skip to content

Commit a68bde9

Browse files
author
jdv
committed
clean up and precisions of a few pages still wip
1 parent 5d9b225 commit a68bde9

File tree

4 files changed

+309
-91
lines changed

4 files changed

+309
-91
lines changed

crowdsec-docs/unversioned/troubleshooting/issue_engine_no_alerts.md

Lines changed: 100 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,106 +13,159 @@ The **Engine No Alerts** issue appears when your Security Engine has been runnin
1313

1414
## Common Root Causes
1515

16-
- **No logs being read**: The acquisition configuration may be missing, disabled, or pointing to empty log sources.
17-
- **No logs being parsed**: Logs are being read but parsers can't process them due to format mismatches or missing collections.
1816
- **Scenarios in simulation mode**: Detection scenarios are installed but set to simulation mode, preventing actual alerts.
19-
- **Legitimate low-activity environment**: In some cases, truly clean environments with no malicious activity may not trigger alerts.
17+
- **Are appropriate collections installed**: make sure you have the detection scenarios and/or appsec rules covering your services needs
18+
- **Low/no-traffic environment**: If your service handles very few request or is not open to the internet it's usually to observe low/no malicious activity.
19+
- **Legitimate low-activity environment**: Your defenses preceding your service might be good enough that you don't detect additional malicious behaviors (CrowdSec blocklists or other protections may already deflect most malicious activity)
20+
21+
<a name="otherIssues"></a>
22+
23+
**Other Issues**
24+
- 🔗 **[No logs being read](/u/troubleshooting/issue_lp_no_logs_read)**: The acquisition configuration may be missing, disabled, or pointing to empty log sources.
25+
- 🔗 **[No logs being parsed](/u/troubleshooting/issue_lp_no_logs_parsed)**: Logs are being read but parsers can't process them due to format mismatches or missing collections.
2026

2127
## How to Diagnose
2228

23-
### Check metrics to identify the issue
29+
If it's not due to [other issues](#otherIssues), here are the diagnosis and resolutions for other root causes.
30+
31+
### Check if scenarios are in simulation mode
2432

25-
Run the metrics command to see the full pipeline:
33+
Verify whether your scenarios are set to simulation mode, which prevents them from generating alerts:
2634

2735
```bash
2836
# On host
29-
sudo cscli metrics show acquisition parsers scenarios
37+
sudo cscli simulation status
3038

3139
# Docker
32-
docker exec crowdsec cscli metrics show acquisition parsers scenarios
40+
docker exec crowdsec cscli simulation status
3341

3442
# Kubernetes
35-
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli metrics show acquisition parsers scenarios
43+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli simulation status
3644
```
3745

38-
Look for:
39-
- **Acquisition Metrics**: Are log lines being read? (non-zero "Lines read")
40-
- **Parser Metrics**: Are logs being parsed successfully? (non-zero "Lines parsed")
41-
- **Scenario Metrics**: Are scenarios evaluating events? (check "Current count" or "Overflow")
46+
If scenarios are listed, they're in simulation mode and won't be sent to CrowdSec console (they should however still appear in `cscli alerts list`).
47+
48+
### Check if appropriate collections are installed
4249

43-
### Check recent alerts
50+
Verify you have collections matching your protected services:
4451

4552
```bash
4653
# On host
47-
sudo cscli alerts list
54+
sudo cscli collections list
4855

4956
# Docker
50-
docker exec crowdsec cscli alerts list
57+
docker exec crowdsec cscli collections list
5158

5259
# Kubernetes
53-
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli alerts list
60+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli collections list
5461
```
5562

56-
If the list is empty, proceed with the resolution steps below.
63+
Compare your installed collections against your actual services (nginx, apache, ssh, etc.). Missing collections means no detection rules for those services.
5764

58-
## How to Resolve
65+
### Evaluate your service activity level
5966

60-
### If no logs are being read
67+
Check how much traffic your service is processing:
6168

62-
This is the most common cause. Follow the [LP No Logs Read troubleshooting guide](/u/troubleshooting/lp_no_logs_read) for detailed steps.
63-
64-
**Quick checks:**
65-
- Verify acquisition configuration exists (`/etc/crowdsec/acquis.yaml` or `acquis.d/`)
66-
- Ensure log files exist and are accessible
67-
- Check file permissions allow CrowdSec to read logs
69+
```bash
70+
# On host
71+
sudo cscli metrics show acquisition parsers
6872

69-
### If logs are read but not parsed
73+
# Docker
74+
docker exec crowdsec cscli metrics show acquisition parsers
7075

71-
Follow the [LP No Logs Parsed troubleshooting guide](/u/troubleshooting/lp_no_logs_parsed) for detailed steps.
76+
# Kubernetes
77+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli metrics show acquisition parsers
78+
```
7279

73-
**Quick checks:**
74-
- Verify collections are installed: `cscli collections list`
75-
- Check log format matches parser expectations
76-
- Use `cscli explain --log "<sample log line>" --type <type>` to test parsing
80+
Look at "Lines parsed" - if this number is very low (dozens or hundreds per day), you may simply have insufficient traffic volume for malicious activity to appear.
7781

78-
### If scenarios are in simulation mode
82+
### Check if proactive defenses are blocking threats upstream
7983

80-
Check if scenarios are in simulation:
84+
If you have CrowdSec blocklists or other protection layers active, they may be blocking malicious traffic before it reaches your scenarios:
8185

8286
```bash
83-
sudo cscli simulation status
87+
# On host
88+
sudo cscli decisions list
89+
sudo cscli metrics show bouncers
90+
91+
# Docker
92+
docker exec crowdsec cscli decisions list
93+
docker exec crowdsec cscli metrics show bouncers
94+
95+
# Kubernetes
96+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli decisions list
97+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli metrics show bouncers
8498
```
8599

86-
If scenarios are in simulation mode, they will be listed. To disable simulation for all scenarios:
100+
High numbers of active decisions or bouncer blocks indicate your proactive defenses are working - malicious actors never reach your log-based detection.
101+
102+
## How to Resolve
103+
104+
### If scenarios are in simulation mode
105+
106+
Disable simulation mode to allow alerts to be generated:
87107

88108
```bash
109+
# On host
89110
sudo cscli simulation disable --all
90111
sudo systemctl reload crowdsec
112+
113+
# Docker
114+
docker exec crowdsec cscli simulation disable --all
115+
docker restart crowdsec
116+
117+
# Kubernetes
118+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli simulation disable --all
119+
kubectl rollout restart deployment/crowdsec -n crowdsec
91120
```
92121

93-
Or for specific scenarios:
122+
You can also disable simulation for specific scenarios only:
94123

95124
```bash
96125
sudo cscli simulation disable crowdsecurity/ssh-bf
97126
sudo systemctl reload crowdsec
98127
```
99128

100-
### If this is a low-activity environment
129+
### If appropriate collections are missing
130+
131+
Install collections matching your protected services. Visit the [CrowdSec Hub](https://hub.crowdsec.net/) to find collections for your stack:
132+
133+
- **Web servers**: `crowdsecurity/nginx`, `crowdsecurity/apache2`, `crowdsecurity/caddy`
134+
- **SSH**: `crowdsecurity/sshd`
135+
- **Linux base**: `crowdsecurity/linux`
136+
- **AppSec/WAF**: `crowdsecurity/appsec-*` collections for application-level protection
137+
138+
Install collections using:
139+
140+
```bash
141+
# On host
142+
sudo cscli collections install crowdsecurity/nginx
143+
sudo systemctl reload crowdsec
144+
145+
# Docker
146+
docker exec crowdsec cscli collections install crowdsecurity/nginx
147+
docker restart crowdsec
148+
149+
# Kubernetes
150+
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l type=lapi -o name) -- cscli collections install crowdsecurity/nginx
151+
kubectl rollout restart deployment/crowdsec -n crowdsec
152+
```
153+
154+
### If this is a low-traffic environment
101155

102-
In genuinely clean environments, you can:
156+
For services with minimal traffic or limited internet exposure:
103157

104-
1. **Test with dummy scenarios** using the [Health Check guide](/u/getting_started/health_check) to verify detection works
105-
2. **Subscribe to Community Blocklist** decisions in the Console to add proactive blocking
106-
3. **Monitor metrics regularly** to ensure the pipeline stays healthy
158+
1. **Verify detection is working** by triggering test scenarios as described in the [Health Check guide](/u/getting_started/health_check/#trigger-crowdsecs-test-scenarios)
159+
2. **Consider this normal** - If your detection is properly working, low traffic may means fewer threats to detect and you can ignore the issue for now.
107160

108-
## Verify Resolution
161+
### If proactive defenses are already handling threats
109162

110-
After making changes:
163+
This is actually a **positive outcome** - your blocklists and bouncers are preventing malicious traffic from reaching your services:
111164

112-
1. Restart CrowdSec: `sudo systemctl restart crowdsec`
113-
2. Wait a few minutes for log processing
114-
3. Check metrics again: `sudo cscli metrics show scenarios`
115-
4. Trigger a test alert using the [Health Check detection tests](/u/getting_started/health_check#-detection-checks)
165+
1. **Verify your setup is working** by running the [Health Check detection tests](/u/getting_started/health_check#-detection-checks) to confirm scenarios can still trigger when needed
166+
2. **Monitor bouncer metrics** to see how many threats are being blocked: `sudo cscli metrics show bouncers`
167+
3. **Review active decisions** to understand what threats are being prevented: `sudo cscli decisions list`
168+
4. **Keep the Console enrolled** to maintain visibility into your protection posture even if local alerts are minimal
116169

117170
## Related Issues
118171

0 commit comments

Comments
 (0)