Skip to content
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

feat: Add serviceMonitor resource #537

Merged
merged 10 commits into from
Aug 22, 2024
Merged
13 changes: 12 additions & 1 deletion charts/opensearch-dashboards/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand All @@ -13,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.20.1]
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
### Added
- Added `ServiceMonitor` support for Prometheus monitoring
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.20.0]
### Added
- Updated OpenSearch Dashboards appVersion to 2.16.0
Expand Down Expand Up @@ -358,7 +368,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.1...HEAD
[2.20.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.0...opensearch-dashboards-2.20.1
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
[2.20.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.19.1...opensearch-dashboards-2.20.0
[2.19.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.19.0...opensearch-dashboards-2.19.1
[2.19.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.18.0...opensearch-dashboards-2.19.0
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch-dashboards/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.20.0
version: 2.20.1
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
191 changes: 115 additions & 76 deletions charts/opensearch-dashboards/README.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions charts/opensearch-dashboards/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "opensearch-dashboards.fullname" . }}-service-monitor
namespace: {{ .Release.Namespace }}
labels:
{{- include "opensearch-dashboards.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "opensearch-dashboards.selectorLabels" . | nindent 6 }}
endpoints:
- port: {{ .Values.metricsPort }}
interval: {{ .Values.serviceMonitor.interval }}
path: {{ .Values.serviceMonitor.path }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,21 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin-downloadable-url

# ServiceMonitor Configuration for Prometheus
# Enabling this option will create a ServiceMonitor resource that allows Prometheus to scrape metrics from the OpenSearch service.
serviceMonitor:
# Set to true to enable the ServiceMonitor resource for OpenSearch Dashboards
enabled: false

# HTTP path where metrics are exposed by OpenSearch Dashboards.
# Ensure this path is correctly set in your service.
path: /_prometheus/metrics

# Frequency at which Prometheus will scrape metrics.
# Modify as needed for your monitoring requirements.
interval: 10s

# Port configuration for metrics.
# This should match the port exposed by the OpenSearch Dashboards service.
metricsPort: 9601
13 changes: 12 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand All @@ -13,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.22.2]
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
### Added
- Added `ServiceMonitor` support for Prometheus monitoring
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.22.1]
### Added
### Changed
Expand Down Expand Up @@ -440,7 +450,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.1...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.2...HEAD
[2.22.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.1...opensearch-2.22.2
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
[2.22.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.0...opensearch-2.22.1
[2.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.21.0...opensearch-2.22.0
[2.21.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.20.0...opensearch-2.21.0
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.22.1
version: 2.22.2
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved

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