Grafana: Difference between revisions
Pamplemousse (talk | contribs) No edit summary |
Pamplemousse (talk | contribs) No edit summary |
||
Line 52: | Line 52: | ||
=== Declarative configuration === | === Declarative configuration === | ||
<syntaxhighlight lang=nix> | <syntaxhighlight lang="nix"> | ||
services.grafana = { | services.grafana = { | ||
declarativePlugins = with pkgs.grafanaPlugins; [ ... ]; | declarativePlugins = with pkgs.grafanaPlugins; [ ... ]; | ||
Line 65: | Line 65: | ||
datasources.settings.datasources = [ | datasources.settings.datasources = [ | ||
# "Built-in" datasources can be provisioned https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources | # "Built-in" datasources can be provisioned - c.f. https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources | ||
{ | { | ||
name = "Prometheus"; | name = "Prometheus"; | ||
Line 71: | Line 71: | ||
url = "${config.services.prometheus.listenAddress}:${toString config.services.prometheus.port}"; | url = "${config.services.prometheus.listenAddress}:${toString config.services.prometheus.port}"; | ||
} | } | ||
# Some plugins also can https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource/latest/setup/provisioning/ | # Some plugins also can - c.f. https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource/latest/setup/provisioning/ | ||
{ | { | ||
name = "Infinity"; | name = "Infinity"; | ||
type = "yesoreyeram-infinity-datasource"; | type = "yesoreyeram-infinity-datasource"; | ||
} | } | ||
# But not all | # But not all - c.f. https://github.com/fr-ser/grafana-sqlite-datasource/issues/141 | ||
]; | ]; | ||