diff --git a/config/application.conf b/config/application.conf index f8b4138..230546f 100644 --- a/config/application.conf +++ b/config/application.conf @@ -14,8 +14,33 @@ play { } } +{{- if .Values.metrics.enabled }} +kamon { + modules { + apm-reporter.enabled = no + prometheus-reporter.enabled = yes + host-metrics.enabled = no + jvm-metrics { + enabled = no + } + } + + prometheus { + include-environment-tags = true + embedded-server { + hostname = 0.0.0.0 + port = {{ .Values.metrics.port }} + } + } + + init.hide-banner = yes +} +{{- end }} + + + {{- if .Values.extraConfig }} # Extra configuration injected by extraConfig {{ .Values.extraConfig | nindent 2 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/values.yaml b/values.yaml index eb7e989..4b2a613 100644 --- a/values.yaml +++ b/values.yaml @@ -712,3 +712,10 @@ extraObjects: [] ## data: ## - key: horizon-secret-key ## name: horizon-secret-name + +## Enable Prometheus metrics +metrics: + ## @param metrics.enabled Whether to enable Prometheus metrics + enabled: false + ## @param metrics.port Prometheus metrics port + port: 9095