check_mailq: use postqueue JSON output - #432
Draft
c-kr wants to merge 4 commits into
Draft
Conversation
Read Postfix queue statistics through postqueue -j so the check does not require direct access to queue directories. The existing directory-based mode remains active as a fallback when postqueue fails. Fixes ConSol-Monitoring#431
Keep the anonymized postqueue output in its original one-entry-per-line format and disable the line-length check for this test only.
Contributor
|
It would work without any custom configuration on the target host if we run postqueue as root, right? |
Contributor
Author
|
I just tested it. Root user can always access queue via postqueue no matter whats restricted, even with But the default should be that any user can read Side node, even if MTA is down, root can access the queue via
|
Keep the generated check_mailq documentation in sync with the check metadata so the documentation cleanliness check passes.
The postqueue fixture uses Unix shell utilities and the check itself is not implemented on Windows, so restrict the test to non-Windows platforms.
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.
Read Postfix queue statistics through postqueue -j so the check does not require direct access to queue directories. The existing directory-based mode remains active as a fallback when postqueue fails.
Tested against real postfix postqueue json output. Draft status as it could need some more real life testing before merging
Fixes #431