mio-ops/profiles/grafana.nix

46 lines
1 KiB
Nix
Raw Normal View History

2020-05-28 04:21:36 +00:00
# NixOps configuration for the hosts running Prometheus on a Cardano node
{ config, pkgs, lib, ... }:
{
2021-11-16 04:57:23 +00:00
imports = [ ../secrets/cardano/grafana.nix ];
2020-05-28 04:21:36 +00:00
services = {
grafana = {
enable = true;
addr = "0.0.0.0";
domain = "monitoring.mcwhirter.io";
rootUrl = "https://monitoring.mcwhirter.io/grafana";
security = {
2021-11-16 04:57:23 +00:00
adminPasswordFile =
"/run/keys/grafana-apass"; # Where to find the password
2020-05-28 04:21:36 +00:00
};
auth = {
anonymous = {
2021-11-16 04:57:23 +00:00
enable = true; # Allow anonymous access
2020-05-28 04:21:36 +00:00
};
};
provision = {
enable = true;
#dashboards = [
# {
# name = "Node System Dashboard";
# folder = "General";
# options.path = ../monitoring/NodeSystemDashboard.json;
# }
#];
2021-11-16 04:57:23 +00:00
datasources = [{
type = "prometheus";
name = "prometheus";
url = "http://localhost:9090/prometheus";
}];
2020-05-28 04:21:36 +00:00
};
};
};
2021-11-16 04:57:23 +00:00
users.groups.keys.members =
[ "grafana" ]; # Required due to NixOps issue #1204
2020-05-28 04:21:36 +00:00
}