Skip to content

Commit 73589ff

Browse files
author
jdv
committed
finalizing fixes
1 parent dfcd52d commit 73589ff

File tree

1 file changed

+20
-50
lines changed

1 file changed

+20
-50
lines changed

crowdsec-docs/unversioned/getting_started/health_check.mdx

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -442,38 +442,36 @@ Were all the tests related to your setup successful?
442442

443443
## 🔌 CrowdSec Connectivity checks
444444

445-
### Is your Security Engine receiving community blocklists?
445+
### *Check CAPI status*
446446

447-
Lets confirm that your Security Engine can communicate with the CrowdSec Central API (CAPI).
447+
Let's confirm that your Security Engine can communicate with the CrowdSec Central API (CAPI).
448448
This connection allows you to:
449449
- Receive **Community Blocklists** -- curated IPs flagged as malicious by the global CrowdSec network.
450450
- Receive additional Blocklists of your choice among the ones available to you.
451451
- Contribute back -- sharing detected Malicious IPs triggering installed scenarios.
452452

453453
<details>
454-
<summary>🔌 CrowdSec Central API connectivity</summary>
454+
<summary>🔌 CrowdSec Central API connectivity test</summary>
455455

456-
The most direct way to verify connectivity is to see if your instance has already received decisions from the Community Blocklist.
457-
458-
1️⃣ List decisions coming from CAPI
456+
Check your CAPI connection status:
459457

460458
<Tabs groupId="deployment">
461459
<TabItem value="host" label="On Host" default>
462-
<CodeBlock className="language-bash">sudo cscli decisions list --origin CAPI</CodeBlock>
460+
<CodeBlock className="language-bash">sudo cscli capi status</CodeBlock>
463461
</TabItem>
464462
<TabItem value="docker" label="Docker">
465-
<CodeBlock className="language-bash">docker exec crowdsec cscli decisions list --origin CAPI</CodeBlock>
463+
<CodeBlock className="language-bash">docker exec crowdsec cscli capi status</CodeBlock>
466464
</TabItem>
467465
<TabItem value="kubernetes" label="Kubernetes">
468-
<CodeBlock className="language-bash">kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l k8s-app=crowdsec -l type=lapi -o name) -- cscli decisions list --origin CAPI</CodeBlock>
466+
<CodeBlock className="language-bash">kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l k8s-app=crowdsec -l type=lapi -o name) -- cscli capi status</CodeBlock>
469467
</TabItem>
470468
</Tabs>
471469

472-
☑️ If you see decisions, you're connected and receiving threat intel.
470+
☑️ You should see: `INFO You can successfully interact with Central API (CAPI)`
473471

474472
**Notes:**
475-
- On a fresh install, it might take a few minutes before any decisions appear.
476-
- Restarting the CrowdSec service will force it to perform a first pull.
473+
- On a fresh install, credentials might need to be registered (see troubleshooting below).
474+
- The output also shows information about the connectivity config file path and enrollment status with CrowdSec Console.
477475
</details>
478476

479477
### Were all the tests successful ?
@@ -486,21 +484,11 @@ Were all the tests related to your setup successful?
486484
<details>
487485
<summary>🐞 Connectivity Troubleshooting</summary>
488486

489-
Let's verify your CAPI connection step-by-step.
487+
If the CAPI status check fails, here are the most common issues and solutions:
490488

491489
<Tabs groupId="deployment">
492490
<TabItem value="host" label="On Host" default>
493491

494-
**Check CAPI status:**
495-
```bash
496-
sudo cscli capi status
497-
```
498-
499-
**Should show:**
500-
- `INFO You can successfully interact with Central API (CAPI)`
501-
- Information about the connectivity config file path
502-
- Enrollment status with CrowdSec Console
503-
504492
**Common issues:**
505493
- **Missing credentials**: If `online_api_credentials.yaml` is missing:
506494
```bash
@@ -517,14 +505,6 @@ Were all the tests related to your setup successful?
517505
</TabItem>
518506
<TabItem value="docker" label="Docker">
519507

520-
**Check CAPI status:**
521-
```bash
522-
docker exec crowdsec cscli capi status
523-
```
524-
525-
**Should show:**
526-
- `INFO You can successfully interact with Central API (CAPI)`
527-
528508
**Common issues:**
529509
- **No internet from container**: Ensure container can reach external networks
530510
```bash
@@ -542,15 +522,6 @@ Were all the tests related to your setup successful?
542522
</TabItem>
543523
<TabItem value="kubernetes" label="Kubernetes">
544524

545-
**Check CAPI status:**
546-
```bash
547-
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l k8s-app=crowdsec -l type=lapi -o name) -- cscli capi status
548-
```
549-
550-
**Should show:**
551-
- `INFO You can successfully interact with Central API (CAPI)`
552-
- Enrollment information if configured
553-
554525
**Common issues:**
555526
- **No external connectivity**: Test from pod:
556527
```bash
@@ -693,22 +664,21 @@ You might want to continue to the next recommended steps:
693664
```
694665

695666
**Common issues:**
696-
- **Service discovery**: Bouncer should connect to `http://crowdsec-lapi.crowdsec.svc.cluster.local:8080`
697-
- **Register bouncer**: For Kubernetes remediation components (Ingress-Nginx, Traefik):
667+
- **Service discovery**: Bouncer should connect to `http://crowdsec-service.crowdsec.svc.cluster.local:8080`
668+
- **Register bouncer**:
698669
```bash
699-
# Generate API key
700-
kubectl exec -n crowdsec -it $(kubectl get pods -n crowdsec -l k8s-app=crowdsec -l type=lapi -o name) -- cscli bouncers add k8s-bouncer
701-
702-
# Or pre-configure in values.yaml
670+
# Generate API key with a tool of your choice
671+
# Then fill the values.yaml accordingly to dictates the bouncer name and api key use for this communication with LAPI
672+
# values.yaml
703673
lapi:
704674
env:
705-
- name: BOUNCER_KEY_k8s
706-
value: "your-api-key-here"
675+
- name: BOUNCER_KEY_<bouncer-name>
676+
value: "api-key-you-want-this-bouncer-to-use"
707677
```
708678
- **Network policies**: Ensure bouncer namespace can reach crowdsec namespace
709-
- **Service accessibility**: Verify the crowdsec-lapi service is accessible:
679+
- **Service accessibility**: Verify the LAPI, named `crowdsec-service` is accessible:
710680
```bash
711-
kubectl get svc -n crowdsec crowdsec-lapi
681+
kubectl get svc -n crowdsec crowdsec-service
712682
```
713683

714684
**For Ingress Nginx bouncer:**

0 commit comments

Comments
 (0)