From a39f3f8601240e9d3bad8af887fe2ff586008504 Mon Sep 17 00:00:00 2001 From: ebner Date: Wed, 13 Nov 2024 12:59:12 +0100 Subject: [PATCH] add info for grafana configuration --- engineering-guide/metrics.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/engineering-guide/metrics.md b/engineering-guide/metrics.md index e0ae2e1c..220bb88e 100644 --- a/engineering-guide/metrics.md +++ b/engineering-guide/metrics.md @@ -17,3 +17,31 @@ New telegraf/hiera metric sources are automatically added by a systemd timer onc To add a new metric source manually go about like this: ![](_static/add_new_metric_source.png) + + +## Configuration + +### Grafana Dashboard Management +Dashboards can be automatically imported into grafana via files on the filesytem: https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards + +**/etc/grafana/provisioning/dashboards/importer.yaml**: +```yaml +# # config file version +# https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards +apiVersion: 1 + +providers: + - name: 'default' + orgId: 1 + folder: '' + folderUid: '' + type: file + disableDeletion: false + updateIntervalSeconds: 10 + allowUiUpdates: false + options: + path: /var/lib/grafana/dashboards + foldersFromFilesStructure: true +``` + +The dashboard `.json` files need to be located then in `/var/lib/grafana/dashboards` \ No newline at end of file