Description
The integrated CrowdSec remediation component (Lua) in NPMplus is sending invalid JSON payloads to the CrowdSec Local API (LAPI) for usage metrics. This results in an HTTP 400 error, and as a consequence, no remediation metrics (blocks/processed requests) are displayed in the CrowdSec Console dashboard.
The specific error is a schema mismatch in the feature_flags field. NPMplus sends an object {}, but CrowdSec (since v1.7.x) strictly expects an array of strings [].
Environment
- Image: zoeyvid/npmplus:latest
- NPMplus Version: 2.13.6 (Build 2026-01-20-r2-7a067c6)
- Remediation Component Version: crowdsec-npmplus-bouncer/v1.1.3+2026-01-20-r2-7a067c6-2.13.6
- CrowdSec LAPI Version: v1.7.4-db3efdbf
Logs (from CrowdSec LAPI)
When the bouncer attempts to push metrics, the following error is logged:
time="2026-01-21T14:46:46+01:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.feature_flags of type []string" func=UsageMetrics
time="2026-01-21T14:46:46+01:00" level=info msg="192.168.178.254 - [Wed, 21 Jan 2026 14:46:46 CET] "POST /v1/usage-metrics HTTP/1.1 400 442.833µs "crowdsec-npmplus-bouncer/v1.1.3+2026-01-20-r2-7a067c6-2.13.6" "" module=lapi
Description
The integrated CrowdSec remediation component (Lua) in NPMplus is sending invalid JSON payloads to the CrowdSec Local API (LAPI) for usage metrics. This results in an HTTP 400 error, and as a consequence, no remediation metrics (blocks/processed requests) are displayed in the CrowdSec Console dashboard.
The specific error is a schema mismatch in the
feature_flagsfield. NPMplus sends an object{}, but CrowdSec (since v1.7.x) strictly expects an array of strings[].Environment
Logs (from CrowdSec LAPI)
When the bouncer attempts to push metrics, the following error is logged:
time="2026-01-21T14:46:46+01:00" level=error msg="Failed to bind json: json: cannot unmarshal object into Go struct field AllMetrics.remediation_components.feature_flags of type []string" func=UsageMetrics
time="2026-01-21T14:46:46+01:00" level=info msg="192.168.178.254 - [Wed, 21 Jan 2026 14:46:46 CET] "POST /v1/usage-metrics HTTP/1.1 400 442.833µs "crowdsec-npmplus-bouncer/v1.1.3+2026-01-20-r2-7a067c6-2.13.6" "" module=lapi