-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jmx-exporter monitoring functionality with servicemonitor (#147)
* Add jmx-exporter monitoring functionality with servicemonitor * Update Chart version and README * fix: helm-docs version to 1.11.0 * Bump Chart version to 2.7.0
- Loading branch information
Showing
13 changed files
with
290 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
valeriano-manassero/trino/templates/configmap-jmx-exporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{- if or .Values.jmxExporter.coordinator.enabled .Values.jmxExporter.worker.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "trino.fullname" . }}-jmx-exporter | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
data: | ||
trino.yaml: | | ||
startDelaySeconds: 5 | ||
rules: | ||
- pattern : trino.execution<name=SqlTaskManager><>InputDataSize.OneMinute.Count | ||
name: trino_coord_Input_bytes_sci | ||
- pattern : trino.execution<name=SqlTaskManager><>InputPositions.OneMinute.Count | ||
name: trino_coord_Input_rows | ||
- pattern : trino.execution<name=SqlTaskManager><>OutputDataSize.OneMinute.Count | ||
name: trino_coord_Output_bytes_sci | ||
- pattern : trino.execution<name=SqlTaskManager><>OutputPositions.OneMinute.Count | ||
name: trino_coord_Output_rows | ||
- pattern : trino.memory<type=ClusterMemoryPool, name=general><>TotalDistributedBytes | ||
name: trino_TotalDistributedBytes | ||
- pattern : trino.memory<type=ClusterMemoryPool, name=general><>ReservedDistributedBytes | ||
name: trino_ReservedDistributedBytes | ||
- pattern : trino.execution<name=QueryManager><>FailedQueries.OneMinute.Count | ||
name: trino_Failed_Queries | ||
- pattern : trino.execution<name=QueryManager><>RunningQueries | ||
name: trino_running_queries | ||
- pattern : trino.failuredetector<name=HeartbeatFailureDetector><>ActiveCount | ||
name: trino_active_nodes | ||
- pattern : trino.memory<type=ClusterMemoryPool, name=general><>FreeDistributedBytes | ||
name: trino_cluster_free_memory | ||
- pattern : trino.execution<name=QueryExecution><>Executor.QueuedTaskCount | ||
name: trino_queued_task_count | ||
- pattern : trino.execution<name=QueryManager><>StartedQueries.FiveMinute.Count | ||
name: trino_started_queries | ||
- pattern : java.lang<type=Memory><HeapMemoryUsage>committed | ||
name: trino_jvm_heap_memory_usage | ||
- pattern : java.lang<type=Threading><>ThreadCount | ||
name: trino_jvm_thread_count | ||
- pattern : trino.execution<name=QueryManager><>InternalFailures.OneMinute.Count | ||
name: trino_failed_queries_internal | ||
- pattern : trino.execution<name=QueryManager><>ExternalFailures.OneMinute.Count | ||
name: trino_failed_queries_external | ||
- pattern : trino.execution<name=QueryManager><>UserErrorFailures.OneMinute.Count | ||
name: trino_failed_queries_user | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
valeriano-manassero/trino/templates/service-coordinator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.jmxExporter.coordinator.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "trino.coordinator" . }} | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: coordinator | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.jmxExporter.port | default 9000 }} | ||
targetPort: jmx-exporter | ||
protocol: TCP | ||
name: {{ .Values.jmxExporter.serviceMonitor.port | default "jmx-exporter" }} | ||
selector: | ||
{{- include "trino.selectorLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: coordinator | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.jmxExporter.worker.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "trino.worker" . }} | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: worker | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.jmxExporter.port | default 9000 }} | ||
targetPort: jmx-exporter | ||
protocol: TCP | ||
name: {{ .Values.jmxExporter.serviceMonitor.port | default "jmx-exporter" }} | ||
selector: | ||
{{- include "trino.selectorLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: worker | ||
{{- end }} |
32 changes: 32 additions & 0 deletions
32
valeriano-manassero/trino/templates/servicemonitor-coordinator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- if and .Values.jmxExporter.coordinator.enabled .Values.jmxExporter.serviceMonitor.enabled -}} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ template "trino.coordinator" . }} | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
spec: | ||
jobLabel: {{ .Release.Name }}-coordinator | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
selector: | ||
matchLabels: | ||
{{- include "trino.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: coordinator | ||
endpoints: | ||
- port: {{ .Values.jmxExporter.serviceMonitor.port }} | ||
{{- with .Values.jmxExporter.serviceMonitor.path }} | ||
path: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.interval }} | ||
interval: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.relabelings }} | ||
relabelings: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
32 changes: 32 additions & 0 deletions
32
valeriano-manassero/trino/templates/servicemonitor-worker.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- if and .Values.jmxExporter.worker.enabled .Values.jmxExporter.serviceMonitor.enabled -}} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ template "trino.worker" . }} | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
spec: | ||
jobLabel: {{ .Release.Name }}-worker | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
selector: | ||
matchLabels: | ||
{{- include "trino.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: worker | ||
endpoints: | ||
- port: {{ .Values.jmxExporter.serviceMonitor.port }} | ||
{{- with .Values.jmxExporter.serviceMonitor.path }} | ||
path: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.interval }} | ||
interval: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ . }} | ||
{{- end }} | ||
{{- with .Values.jmxExporter.serviceMonitor.relabelings }} | ||
relabelings: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.