Add Dovecot application monitoring - #1
Open
shpokas wants to merge 3 commits into
Open
Conversation
Polls the dovecot SNMP extend (nsExtendOutputFull) which returns JSON statistics from doveadm. Tracks connections, auth rates and durations, IMAP/SMTP command rates and latencies, mail delivery, and Sieve actions. Creates 7 RRD categories: connections, auth, auth_duration, imap, smtp, delivery, sieve — with corresponding graph files and a device app page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers Dovecot 2.4 metric configuration, SNMP extend setup including sudo requirements, verification steps, and a graph reference table. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Required for the /apps?app=dovecot page to render without an "Undefined array key" error — the default.inc.php handler iterates $graphs[$app->app_type] which must be declared here. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shpokas
pushed a commit
that referenced
this pull request
May 22, 2026
…ibrenms#19641) * Update Xdsl.php This PR fixes a TypeError in the Xdsl module that occurs when the SNMP response for adslMibObjects or vdsl2LineTable returns data in an unexpected format (e.g., a string instead of an array). This usually happens with older or buggy DSLAM implementations (like some my ZTE models). Currently, the code passes the $data variable directly into the PortAdsl or PortVdsl constructor without validating that it is an array, leading to a fatal error:TypeError: Illuminate\Database\Eloquent\Model::__construct(): Argument #1 ($attributes) must be of type array, string given. Changes:Added is_array($data) checks in pollAdsl and pollVdsl methods before model instantiation. Added a warning log when invalid data is received to help with debugging. Testing:Tested with my device returning malformed ADSL SNMP tables. Verified that the discovery/polling process continues for other ports/modules instead of crashing. * Update Xdsl.php * Update Xdsl.php * Update Xdsl.php * Update Xdsl.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dovecotSNMP extend (/usr/local/bin/dovecot-stats-snmp.sh)doveadm statscontaining 8 metric groupsMetrics collected
connectionsauthauth_durationimapsmtpdeliverysieveFiles added
includes/polling/applications/dovecot.inc.phpincludes/html/pages/device/apps/dovecot.inc.phpincludes/html/graphs/application/dovecot_connections.inc.phpincludes/html/graphs/application/dovecot_auth.inc.phpincludes/html/graphs/application/dovecot_auth_duration.inc.phpincludes/html/graphs/application/dovecot_imap.inc.phpincludes/html/graphs/application/dovecot_smtp.inc.phpincludes/html/graphs/application/dovecot_delivery.inc.phpincludes/html/graphs/application/dovecot_sieve.inc.phpTest plan
lnms device:discover mail.sets.lv -m applications— dovecot discovered (app_id=9)lnms device:poll mail.sets.lv -m applications— all 7 RRD files created and populated🤖 Generated with Claude Code