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