Skip to content

Commit 4253842

Browse files
shubham-cmykShubham GuptaVILJkid
authored
feat: Add serviceMonitor resource (#537)
* 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>
1 parent 4ca8bfd commit 4253842

File tree

10 files changed

+310
-180
lines changed

10 files changed

+310
-180
lines changed

charts/opensearch-dashboards/CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -13,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1314
### Fixed
1415
### Security
1516
---
17+
## [2.21.0]
18+
### Added
19+
- Added `ServiceMonitor` support for Prometheus monitoring
20+
### Changed
21+
### Deprecated
22+
### Removed
23+
### Fixed
24+
### Security
25+
---
1626
## [2.20.0]
1727
### Added
1828
- Updated OpenSearch Dashboards appVersion to 2.16.0
@@ -358,7 +368,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
358368
### Fixed
359369
### Security
360370

361-
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.0...HEAD
371+
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.21.0...HEAD
372+
[2.21.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.0...opensearch-dashboards-2.21.0
362373
[2.20.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.19.1...opensearch-dashboards-2.20.0
363374
[2.19.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.19.0...opensearch-dashboards-2.19.1
364375
[2.19.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.18.0...opensearch-dashboards-2.19.0

charts/opensearch-dashboards/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.20.0
18+
version: 2.21.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/opensearch-dashboards/README.md

+115-76
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.serviceMonitor.enabled }}
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: ServiceMonitor
4+
metadata:
5+
name: {{ template "opensearch-dashboards.fullname" . }}-service-monitor
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "opensearch-dashboards.labels" . | nindent 4 }}
9+
spec:
10+
selector:
11+
matchLabels:
12+
{{- include "opensearch-dashboards.selectorLabels" . | nindent 6 }}
13+
endpoints:
14+
- port: {{ .Values.metricsPort }}
15+
interval: {{ .Values.serviceMonitor.interval }}
16+
path: {{ .Values.serviceMonitor.path }}
17+
{{- end }}

charts/opensearch-dashboards/values.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,21 @@ plugins:
276276
enabled: false
277277
installList: []
278278
# - example-fake-plugin-downloadable-url
279+
280+
# ServiceMonitor Configuration for Prometheus
281+
# Enabling this option will create a ServiceMonitor resource that allows Prometheus to scrape metrics from the OpenSearch service.
282+
serviceMonitor:
283+
# Set to true to enable the ServiceMonitor resource for OpenSearch Dashboards
284+
enabled: false
285+
286+
# HTTP path where metrics are exposed by OpenSearch Dashboards.
287+
# Ensure this path is correctly set in your service.
288+
path: /_prometheus/metrics
289+
290+
# Frequency at which Prometheus will scrape metrics.
291+
# Modify as needed for your monitoring requirements.
292+
interval: 10s
293+
294+
# Port configuration for metrics.
295+
# This should match the port exposed by the OpenSearch Dashboards service.
296+
metricsPort: 9601

charts/opensearch/CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -13,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1314
### Fixed
1415
### Security
1516
---
17+
## [2.23.0]
18+
### Added
19+
- Added `ServiceMonitor` support for Prometheus monitoring
20+
### Changed
21+
### Deprecated
22+
### Removed
23+
### Fixed
24+
### Security
25+
---
1626
## [2.22.1]
1727
### Added
1828
### Changed
@@ -440,7 +450,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
440450
### Security
441451

442452

443-
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.1...HEAD
453+
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.0...HEAD
454+
[2.23.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.1...opensearch-2.23.0
444455
[2.22.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.0...opensearch-2.22.1
445456
[2.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.21.0...opensearch-2.22.0
446457
[2.21.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.20.0...opensearch-2.21.0

charts/opensearch/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.22.1
18+
version: 2.23.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

0 commit comments

Comments
 (0)