-
Notifications
You must be signed in to change notification settings - Fork 245
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 <sidvjmostwanted@gmail.com>
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 <sidvjmostwanted@gmail.com>
…ch dashboards servicemonitor Signed-off-by: VILJkid <sidvjmostwanted@gmail.com>
Signed-off-by: VILJkid <sidvjmostwanted@gmail.com>
* feat: Add serviceMonitor resource Signed-off-by: Shubham Gupta <sgupta@obmondo.com> Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * fix: metrics path Signed-off-by: Shubham Gupta <sgupta@obmondo.com> Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (lint) : trailing newline Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (update) : readme and changelog with comments Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (add) : opensearch-dashboard for serviceMonitor Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (chore) : bump changelog version Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (chore) : bump version Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (lint) : add newline Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (fix) : changelog compare versions Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> * (fix) : bump minor versions instead of patch Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> --------- Signed-off-by: Shubham Gupta <sgupta@obmondo.com> Signed-off-by: VILJkid <sidvjmostwanted@gmail.com> Co-authored-by: Shubham Gupta <sgupta@obmondo.com> Co-authored-by: VILJkid <sidvjmostwanted@gmail.com>
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