Send insights metrics data to AMA #1250
Merged
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.
This pull request primarily focuses on enhancing the
oms.go
file in thesource/plugins/go/src/
directory. The changes primarily revolve around the addition of a new named pipe connection for InsightsMetrics in the AMA (Azure Monitor for containers) context, and modifications to thePostTelegrafMetricsToLA
function to accommodate both Linux and Windows MSI Auth modes.New Named Pipe Connection:
source/plugins/go/src/oms.go
: Added a new named pipe connection,InsightsMetricsNamedPipe
, for sending InsightsMetrics in the AMA context.Changes to
PostTelegrafMetricsToLA
function:source/plugins/go/src/oms.go
: Modified the condition to check for either Linux or Windows MSI Auth mode.source/plugins/go/src/oms.go
: Added variablesbts
ander
to handle bytes and errors respectively.source/plugins/go/src/oms.go
: Extended the logic to handle the case when the OS is Windows and to use theInsightsMetricsNamedPipe
for writing metrics.source/plugins/go/src/oms.go
: Updated log messages to reflect the changes in the function's behavior.Changes to
InitializePlugin
function:source/plugins/go/src/oms.go
: Added logic to create an AMA client for InsightsMetrics in the case of Windows with AAD MSI Auth mode.