[prometheus-mysql-exporter] remove base metrics
endpoint from serviceMonitor when Multitarget is enabled
#4495
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.
What this PR does / why we need it
This PR modifies the serviceMonitor template in the Prometheus MySQL Exporter Helm chart to prevent the default endpoint with the '/metrics' path from being scraped by Prometheus when the multi-target feature is enabled.
The need for this modification arises from the desire to have more control over which endpoints are scraped by Prometheus when using the multi-target feature. Before this, when the multi-target feature was enabled, all endpoints within the MySQL Exporter pod were be scraped, including the '/metrics' endpoint, which may not be desired in certain scenarios.
With this change, users can ensure that only the specific endpoints they want to scrape are included, providing greater flexibility and control over monitoring configurations. This can help optimize resource usage and reduce potential noise in monitoring systems by excluding unnecessary endpoints from scraping.
Which issue this PR fixes
Special notes for your reviewer
None other than requesting to approve initial checks and linting.
@Juanchimienti @monotek
Checklist
[prometheus-couchdb-exporter]
)