-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] OpenSearch and OpenSearch Dashboards Service Monitor Bug #581
[Fix] OpenSearch and OpenSearch Dashboards Service Monitor Bug #581
Conversation
Signed-off-by: VILJkid <[email protected]>
port
Value Bug@@ -92,9 +92,9 @@ helm uninstall my-release | |||
| `opensearchDashboardsYml.defaultMode` | Allow you to set the defaultMode for the opensearch_dashboards.yml mounted as configMap | | | |||
| `dashboardAnnotations` | Allows you to configure custom annotation in the deployement of the OpenSearchDashboards container | {} | | |||
| `serviceMonitor.enabled` | Enables the creation of a [ServiceMonitor] resource for Prometheus monitoring. Requires the Prometheus Operator to be installed in your Kubernetes cluster. | `false` | | |||
| `serviceMonitor.portName` | Name of the port in the OpenSearch Dashboards service that exposes metrics. This should match the port name defined in your OpenSearch service configuration. Applicable only if `serviceMonitor.enabled` is set to `true`. | `metrics` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean the name of serviceMonitor.portName
should be same as OpenSearch service created by the chart ? If so the value passed is portName: metrics
, so is metrics
is the OpenSearch service name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Correct. metrics
is the name of the OpenSearch service which exposes the metrics.
Reference from the existing Service
template:
ports: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it thanks @VILJkid then should we use the same syntax ?
{{ .Values.service.metricsPortName | default "metrics" }}
@peterzhuamazon @TheAlgo @getsaurabh02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Then creating portName
won't be necessary. We can directly use the syntax to fetch the service name.
Thanks @prudhvigodithi! I'll make the necessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @prudhvigodithi,
The changes are implemented in the latest commits. Kindly review and let me know if it needs any further changes.
…arch servicemonitor Signed-off-by: VILJkid <[email protected]>
…ch dashboards servicemonitor Signed-off-by: VILJkid <[email protected]>
Signed-off-by: VILJkid <[email protected]>
* feat: Add serviceMonitor resource Signed-off-by: Shubham Gupta <[email protected]> Signed-off-by: VILJkid <[email protected]> * fix: metrics path Signed-off-by: Shubham Gupta <[email protected]> Signed-off-by: VILJkid <[email protected]> * (lint) : trailing newline Signed-off-by: VILJkid <[email protected]> * (update) : readme and changelog with comments Signed-off-by: VILJkid <[email protected]> * (add) : opensearch-dashboard for serviceMonitor Signed-off-by: VILJkid <[email protected]> * (chore) : bump changelog version Signed-off-by: VILJkid <[email protected]> * (chore) : bump version Signed-off-by: VILJkid <[email protected]> * (lint) : add newline Signed-off-by: VILJkid <[email protected]> * (fix) : changelog compare versions Signed-off-by: VILJkid <[email protected]> * (fix) : bump minor versions instead of patch Signed-off-by: VILJkid <[email protected]> --------- Signed-off-by: Shubham Gupta <[email protected]> Signed-off-by: VILJkid <[email protected]> Co-authored-by: Shubham Gupta <[email protected]> Co-authored-by: VILJkid <[email protected]>
Description
This PR addresses a bug in the
ServiceMonitor
template forOpenSearch
andOpenSearch Dashboards
. Previously, theport
configuration incorrectly used a port number, butServiceMonitor
requires a port name as a string. The fix updates the configuration to use the correct port name, ensuring that Prometheus can properly scrape metrics from theOpenSearch
service.Issues Resolved
#579
Check List
For any changes to files within Helm chart directories:
CHANGELOG.md
updated to reflect changePR sponsored by Obmondo