Docs

Metrics & monitoring

Read AppSec block-rates, bouncer activity, parser throughput, and LAPI health from the Plesk dashboard.

Bastion exposes CrowdSec metrics as a structured JSON snapshot consumed by the Plesk dashboard. The source is always cscli metrics -o json, transformed for compactness.

What the dashboard surfaces

WidgetSourceRefresh
AppSec block-rateappsec-engine.{processed,blocked}60 s
Bouncers statuscscli bouncers list60 s
Top scenarios firingaggregated from cscli alerts list60 s
Parser throughputparsers.* events/min60 s
LAPI healthcscli lapi status30 s
Decisions livecscli decisions list -o jsonon demand

The MetricsService inside the extension caches results for 60 s, cscli metrics itself is cheap, but cache avoids hammering the engine on dashboard refresh.

Read metrics from the CLI

The extension ships two helper scripts (metrics-snapshot.sh and decisions-summary.sh) under its sbin/ directory. Their exact location is printed in the extension’s About panel and shown to active subscribers in the customer portal. Both wrap standard CrowdSec output:

# Raw CrowdSec output (vendor commands, work everywhere)
sudo cscli metrics -o json | jq '.appsec-engine'
sudo cscli bouncers list -o json

The dashboard payload includes computed fields: AppSec block_rate (% blocked/processed), top-3 scenarios, total parsers/scenarios/bouncers/whitelists.

Decision aggregations

decisions-summary.sh returns at-a-glance counts grouped by scenario, country, and ASN. The script lives in the extension’s sbin/ directory and is exposed in the panel UI.

Health checks for external monitoring

A dedicated panel health endpoint is on the roadmap. Today, external monitors can poll the standard CrowdSec API health endpoint or watch the bouncer last-pull timestamp via cscli bouncers list.

Logs to scrape

  • CrowdSec engine logs, parsers, scenarios.
  • CrowdSec API logs, LAPI traffic.
  • Bastion upgrade hook logs, APT upgrade hook outcomes.

Standard syslog rotation rules apply; configure your retention policy as you do for other system services.