[Observability] Clustermgtd to emit heartbeat into event logs rather than explicit CW metric #687
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.
Description of changes
In clustermgtd, we replace the explicit publishing of heartbeat metric with writing the heartbeat as a clustermgtd event into its dedicated events log. In this way, the metric is not created by clustermgtd, but it will be generated by the metric filter created by the CLI.
The advantage of this approach compared to the previous one is that:
cloudwatch:PutMetricDataNotes
In this PR we reverted ebb742f, which is the commit where we introduced the approach of explicitly publishing the metric. Whatever deletion ion the PR diff comes from this revert.
User Experience
Below is an example of heartbeat event written to the clustermgtd events log
/var/log/parallelcluster/clustermgtd.events.The schema of the event is the standard schema for events published by clustermgtd.
Q&A
This is the same behavior we had when we were pushing the metric explicitly. This is the correct approach because in this way the heartbeat event would signal a healthy clustermgtd loop.
This is the standard event schema we use for whatever clustermgtd event. We want to be stick with such default schema to keep the things simple.
Tests
test_monitoringon a cluster using the CLI changes in [Observability] Use metric filter to generate the clustermgtd heartbeat metric. aws-parallelcluster#7219By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.