Add Mongodb Standalone, Sharded, Replica Set Metric Scraper #6951
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:
Adds a new receiver
mongodb
. This receiver is intended to collect metrics from standalone, replica set, and sharded deployments of mongo.I am open to potential renames as to differentiate further from the current mongodb as a service(atlas) receiver if we feel necessary or is too ambiguous.
Pre-requisites:
If authentication is enabled, a clusterMonitor user so that proper commands can be authenticated to collect metrics. There may be plans to extend authentication options but this appears to be the most common approach to authentication if necessary.
This is generally accomplished(at least for mongodb >3.0) via a command like
Configuration
Example:
This is accomplished via the mongo-go-driver driver which supports back to mongo server versions >2.6.
Current proposed list of metrics:
Link to tracking Issue:
Testing:
Integration tests/unit tests
Tested manually against mongo
5.0, 4.4, and 4.0
expect to continue testing while this is reviewed up to earliest version that the mongo-driver supports2.6
Documentation:
Documentation added specifies the metrics collected and configuration. This is autogenerated via the metadata.yml