Skip to content

Conversation

@srikxcipher
Copy link
Contributor

No description provided.

@srikxcipher srikxcipher marked this pull request as ready for review January 8, 2026 07:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes MongoDB replication set metrics in the Grafana dashboard by improving label extraction and increases scrape timeout to handle collection stats timeouts.

Key changes:

  • Updated three Prometheus queries to use label_replace() for extracting pod names from member_idx labels
  • Added scrapeTimeout configuration to the ServiceMonitor with a 30-second timeout (increased from default 10s)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
modules/common/monitoring/mongo/1.0/mongo-dashboard.tf.json Modified three Prometheus queries (PRIMARY members, ping time metrics, and SECONDARY members) to extract pod names using label_replace() and updated legend format to display pod names instead of member state and instance
modules/common/monitoring/mongo/1.0/main.tf Added scrapeTimeout configuration with 30s timeout to ServiceMonitor and improved formatting alignment in the serviceMonitor block

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants