diff --git a/templates/ConfigMap-GrafanaAgent.yaml b/templates/ConfigMap-GrafanaAgent.yaml index 26f48fe..ee47f9b 100644 --- a/templates/ConfigMap-GrafanaAgent.yaml +++ b/templates/ConfigMap-GrafanaAgent.yaml @@ -15,7 +15,7 @@ data: wal_directory: /tmp/wal - +{{ if .Values.nfc_monitoring.loki.config }} logs: positions_directory: "/tmp" @@ -234,7 +234,7 @@ data: - target_label: node source_labels: - __meta_kubernetes_pod_node_name - +{{ end }} integrations: @@ -262,6 +262,8 @@ data: syslog_server.yaml: | # REF: https://grafana.com/docs/loki/latest/send-data/promtail/configuration/#example-syslog-config + +{{ if .Values.nfc_monitoring.loki.config }} server: http_listen_port: 9080 grpc_listen_port: 0 @@ -281,3 +283,5 @@ data: relabel_configs: - source_labels: ['__syslog_message_hostname'] target_label: 'host' +{{ end }} + diff --git a/values.yaml b/values.yaml index f6dd5d1..1742e3d 100644 --- a/values.yaml +++ b/values.yaml @@ -222,9 +222,11 @@ nfc_monitoring: namespace: logging + # If no config is setup, logging will not be enabled. + config: {} # service name and port are used for the connection to your loki instance - service_name: loki-gateway - service_port: 80 + # service_name: loki-gateway + # service_port: 80 ServiceMonitor: selector: