grafana: Configure Loki datastore
Usually, Grafana datastores are configured using its web GUI. When setting up a datastore that requires TLS client authentication, the client certificate and private key have to be pasted into the form. For certificates that renew frequently, this method would require a frequent manual effort. Fortunately, Grafana supports defining datastores via its "provisioning" mechanism, reading the configuration from YAML files on the filesystem.
This commit is contained in:
14
grafana/datasources/loki.yml
Normal file
14
grafana/datasources/loki.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: https://loki.pyrocufflink.blue
|
||||
jsonData:
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
secureJsonData:
|
||||
tlsCACert: $__file{/run/dch-ca/dch-root-ca.crt}
|
||||
tlsClientCert: $__file{/run/secrets/du5t1n.me/loki/tls.crt}
|
||||
tlsClientKey: $__file{/run/secrets/du5t1n.me/loki/tls.key}
|
||||
Reference in New Issue
Block a user