mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51: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 = {
|
grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "grafana.${privateDomain}";
|
domain = "grafana.${privateDomain}";
|
||||||
datasources = {
|
|
||||||
prometheus.enable = true;
|
|
||||||
victoriametrics.enable = true;
|
|
||||||
victorialogs.enable = true;
|
|
||||||
};
|
|
||||||
dashboards = {
|
|
||||||
nodeExporter.enable = true;
|
|
||||||
victoriametrics.enable = true;
|
|
||||||
victorialogs.enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
victoriametrics = {
|
victoriametrics = {
|
||||||
|
|
|
||||||
|
|
@ -20,32 +20,46 @@ in
|
||||||
};
|
};
|
||||||
datasources = {
|
datasources = {
|
||||||
prometheus = {
|
prometheus = {
|
||||||
enable = lib.mkEnableOption "";
|
enable = lib.mkEnableOption "" // {
|
||||||
|
default = config.custom.web-services.victoriametrics.enable;
|
||||||
|
};
|
||||||
url = lib.mkOption {
|
url = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "https://metrics.${config.custom.networking.overlay.domain}";
|
default = "https://${config.custom.web-services.victoriametrics.domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
victoriametrics = {
|
victoriametrics = {
|
||||||
enable = lib.mkEnableOption "";
|
enable = lib.mkEnableOption "" // {
|
||||||
|
default = config.custom.web-services.victoriametrics.enable;
|
||||||
|
};
|
||||||
url = lib.mkOption {
|
url = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "https://metrics.${config.custom.networking.overlay.domain}";
|
default = "https://${config.custom.web-services.victoriametrics.domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
victorialogs = {
|
victorialogs = {
|
||||||
enable = lib.mkEnableOption "";
|
enable = lib.mkEnableOption "" // {
|
||||||
|
default = config.custom.web-services.victorialogs.enable;
|
||||||
|
};
|
||||||
url = lib.mkOption {
|
url = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "https://logs.${config.custom.networking.overlay.domain}";
|
default = "https://${config.custom.web-services.victorialogs.domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
dashboards = {
|
dashboards = {
|
||||||
nodeExporter.enable = lib.mkEnableOption "";
|
nodeExporter.enable = lib.mkEnableOption "" // {
|
||||||
victoriametrics.enable = lib.mkEnableOption "";
|
default = true;
|
||||||
victorialogs.enable = lib.mkEnableOption "";
|
};
|
||||||
crowdsec.enable = lib.mkEnableOption "";
|
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