feat(grafana_agent): not enable if not configured

!8
This commit is contained in:
2024-02-04 15:08:53 +09:30
parent 257da9cd38
commit e13d55e61e
2 changed files with 10 additions and 4 deletions

View File

@ -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 }}

View File

@ -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: