Postfix#938
Open
Simon0Harms wants to merge 2 commits into
Open
Conversation
The host_prefix config option in mk_sap is currently only applied to the SAP
value section header, but not to the logwatch section header. As a result, the two
sections end up on different piggyback hosts when host_prefix is set.
Where
In check(), the SAP data block writes the header as:
"<<<<%s%s>>>>\n" % (cfg_entry.get("host_prefix", ""), host)
while the logwatch block writes:
"<<<<%s>>>>\n" % host
— dropping the prefix.
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA. |
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.
General information
Affected plugin:
agents/plugins/mk_sap.py(SAP R/3 monitoring via RFC/CCMS).The plugin emits piggyback blocks keyed by the SAP SID. It already supports a
host_prefixoption; this change adds a symmetrichost_postfix.Proposed changes
host_postfixconfig key. If set, it is appendedto the SID in the piggyback host name (mirroring the existing
host_prefix).It is applied to both the
sapand thelogwatchsection headers, so both stayon the same piggyback host.
both called
SB1), their piggyback data must be routed to distinct hosts. Asuffix (
SB1_S4H,SB1_ECC) is often preferable to a prefix for grouping andsorting by SID. Doing this in the plugin avoids needing a per-source-host
"Host name translation for piggybacked hosts" rule on the server side, and it
also works when two systems are monitored from the same agent host (where a
source-host-based translation rule cannot separate them).
"<<<<%s%s%s>>>>\n" % (cfg_entry.get("host_prefix", ""), host, cfg_entry.get("host_postfix", ""))for both sections.
host_postfixdefaults to""via.get(), so existingconfigurations are unaffected. The new option is documented in the sample config.
related agent hosts; a suffix-based naming scheme was needed for clean host
naming.
host_postfix(and optionallyhost_prefix) andasserts both the
sapandlogwatchheaders render as<prefix><SID><postfix>.