Skip to content

Add AdGuard Home snmp extend - #629

Merged
VVelox merged 3 commits into
librenms:masterfrom
gthelding:add-adguard-extend
Aug 18, 2026
Merged

Add AdGuard Home snmp extend#629
VVelox merged 3 commits into
librenms:masterfrom
gthelding:add-adguard-extend

Conversation

@gthelding

@gthelding gthelding commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

SNMP extend for AdGuard Home.

Python 3, stdlib only. Reads /etc/snmp/adguard.json (API URL + web UI credentials), queries /control/status and /control/stats, and prints LibreNMS application JSON v1.

Extend name must be adguard. Stats are AdGuard's rolling window (24h by default), not monotonic counters. Default HTTP timeout is 5s per call (two calls per poll); the SNMP timeout must exceed 2 * timeout.

Companion LibreNMS application PR: librenms/librenms#20339

Queries the AdGuard Home REST API (/control/status, /control/stats) and
outputs LibreNMS application JSON v1: query/block counters, average
processing time, and running/protection state. Config (URL + web UI
credentials) lives in /etc/snmp/adguard.json.
Each poll makes two HTTP calls, so 10s each could overrun typical
SNMP timeouts. Document that the SNMP timeout must exceed 2 * timeout.
@CLAassistant

CLAassistant commented Aug 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread snmp/adguard
@VVelox

VVelox commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Looks good. If you could get gzip+base64 added, that would be great. :)

Some net-snmp snmpd versions mangle raw JSON in extend output.
LibreNMS json_app_get already auto-detects and decodes this.
@gthelding

Copy link
Copy Markdown
Contributor Author

done, gzip+base64 in output()

@VVelox
VVelox merged commit 3e13fb9 into librenms:master Aug 18, 2026
3 checks passed
@VVelox

VVelox commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants