Initial prometheus config
Also did provision config for grafana, could be done directly but went through skynet.grafana config
This commit is contained in:
parent
50abdb90ab
commit
183f5a0e7d
4 changed files with 137 additions and 0 deletions
|
@ -24,6 +24,26 @@ in {
|
|||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.host.ip;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = port;
|
||||
};
|
||||
|
||||
datasource = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -44,6 +64,18 @@ in {
|
|||
domain = "${name}.skynet.ie";
|
||||
port = port;
|
||||
addr = cfg.host.ip;
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = cfg.datasource.name;
|
||||
type = "Prometheus";
|
||||
url = cfg.datasource.url;
|
||||
isDefault = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue