mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 11:41:34 +01:00
grafana: Enable datasources and dashboards intelligently
This commit is contained in:
parent
81a08c60a0
commit
2ae08dc9c5
2 changed files with 24 additions and 20 deletions
|
|
@ -65,16 +65,6 @@
|
|||
grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.${privateDomain}";
|
||||
datasources = {
|
||||
prometheus.enable = true;
|
||||
victoriametrics.enable = true;
|
||||
victorialogs.enable = true;
|
||||
};
|
||||
dashboards = {
|
||||
nodeExporter.enable = true;
|
||||
victoriametrics.enable = true;
|
||||
victorialogs.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
victoriametrics = {
|
||||
|
|
|
|||
|
|
@ -20,32 +20,46 @@ in
|
|||
};
|
||||
datasources = {
|
||||
prometheus = {
|
||||
enable = lib.mkEnableOption "";
|
||||
enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.web-services.victoriametrics.enable;
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "https://metrics.${config.custom.networking.overlay.domain}";
|
||||
default = "https://${config.custom.web-services.victoriametrics.domain}";
|
||||
};
|
||||
};
|
||||
victoriametrics = {
|
||||
enable = lib.mkEnableOption "";
|
||||
enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.web-services.victoriametrics.enable;
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "https://metrics.${config.custom.networking.overlay.domain}";
|
||||
default = "https://${config.custom.web-services.victoriametrics.domain}";
|
||||
};
|
||||
};
|
||||
victorialogs = {
|
||||
enable = lib.mkEnableOption "";
|
||||
enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.web-services.victorialogs.enable;
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "https://logs.${config.custom.networking.overlay.domain}";
|
||||
default = "https://${config.custom.web-services.victorialogs.domain}";
|
||||
};
|
||||
};
|
||||
};
|
||||
dashboards = {
|
||||
nodeExporter.enable = lib.mkEnableOption "";
|
||||
victoriametrics.enable = lib.mkEnableOption "";
|
||||
victorialogs.enable = lib.mkEnableOption "";
|
||||
crowdsec.enable = lib.mkEnableOption "";
|
||||
nodeExporter.enable = lib.mkEnableOption "" // {
|
||||
default = true;
|
||||
};
|
||||
victoriametrics.enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.web-services.victoriametrics.enable;
|
||||
};
|
||||
victorialogs.enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.web-services.victorialogs.enable;
|
||||
};
|
||||
crowdsec.enable = lib.mkEnableOption "" // {
|
||||
default = config.custom.services.crowdsec.enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue