feat(grafana): DataSources configurable in values.yaml

!2 #1
This commit is contained in:
2023-09-28 00:32:43 +09:30
parent 239837ecbf
commit 5add73c411
5 changed files with 92 additions and 118 deletions

View File

@ -56,6 +56,67 @@ nfc_monitoring:
topologyKey: kubernetes.io/hostname
weight: 10
# To add Grafan datasources
# Type: list
# See: https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources
DataSources:
- name: alertmanager
type: alertmanager
access: proxy
url: "http://alertmanager-main.{{ .Values.nfc_monitoring.alert_manager.namespace }}.svc:9093"
isDefault: false
jsonData:
tlsSkipVerify: true
timeInterval: "5s"
implementation: prometheus
handleGrafanaManagedAlerts: false
orgId: 1
editable: true
- name: loki
type: loki
access: proxy
url: "http://{{ .Values.nfc_monitoring.loki.service_name }}.{{ .Values.nfc_monitoring.loki.namespace }}.svc.{{ .Values.nfc_monitoring.kubernetes.cluster_dns_name }}:{{ .Values.nfc_monitoring.loki.service_port }}"
isDefault: false
jsonData:
orgId: 1
editable: true
# - name: mimir
# type: prometheus
# access: proxy
# url: "http://mimir-gateway.metrics.svc.cluster.local/prometheus"
# isDefault: false
# jsonData:
# manageAlerts: true
# orgId: 1
# prometheusType: Mimir
# editable: true
- name: prometheus
type: prometheus
access: proxy
url: "http://prometheus-k8s.{{ .Values.nfc_monitoring.prometheus.namespace }}.svc:9090"
isDefault: true
jsonData:
manageAlerts: true
orgId: 1
prometheusType: Prometheus
prometheusVersion: 2.42.0
editable: true
- name: thanos
type: prometheus
access: proxy
url: "http://thanos-query.metrics.svc:9090"
isDefault: false
jsonData:
manageAlerts: true
orgId: 1
prometheusType: Thanos
prometheusVersion: 0.31.0
editable: true
grafana_agent:
image:
@ -138,6 +199,7 @@ nfc_monitoring:
# List of namespaces that prometheus is to monitor
# used to create Roles and RoleBindings
# type: list
monitor_namespaces:
- alerting
- default
@ -169,6 +231,7 @@ nfc_monitoring:
# Additional settings for Prometheus.
# See: https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PrometheusSpec
# Type: dict
additional: {}
# remoteWrite:
@ -216,6 +279,7 @@ nfc_monitoring:
# Prometheus thanos sidecar
# see: https://thanos.io/tip/components/sidecar.md/
# Type: Dict
sidecar:
enabled: true