hosts: init prometheus on hosts
All checks were successful
ci/woodpecker/push/checks Pipeline was successful

This commit is contained in:
notohh 2023-06-19 09:23:56 -04:00
parent a38d6f9846
commit bdee5b8619
Signed by: notohh
GPG key ID: BD47506D475EE86D
8 changed files with 99 additions and 6 deletions

View file

@ -2,5 +2,6 @@ _: {
imports = [
./postgresql.nix
./redis.nix
./prometheus.nix
];
}

View file

@ -0,0 +1,24 @@
_: {
networking.firewall.allowedTCPPorts = [9090];
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "prometheus";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9090"];}];
}
{
job_name = "node";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9100"];}];
}
];
exporters = {
node = {
enable = true;
enabledCollectors = ["systemd" "cpu"];
};
};
};
}

View file

@ -2,6 +2,7 @@ _: {
imports = [
./traefik.nix
./torrent.nix
./prometheus.nix
];
services.radarr = {
enable = true;

View file

@ -0,0 +1,24 @@
_: {
networking.firewall.allowedTCPPorts = [9090];
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "prometheus";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9090"];}];
}
{
job_name = "node";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9100"];}];
}
];
exporters = {
node = {
enable = true;
enabledCollectors = ["systemd" "cpu"];
};
};
};
}

View file

@ -14,15 +14,15 @@ _: {
};
users = {
allow_signup = false;
auto_assign_org = true;
auto_assign_org_role = "Viewer";
};
feature_toggles = {
publicDashboards = true;
};
database = {
type = "postgres";
host = "192.168.1.211:5432";
name = "grafana";
user = "grafana";
password = "grafana";
ssl_mode = "disable";
};
};
@ -32,7 +32,25 @@ _: {
{
name = "Prometheus";
type = "prometheus";
url = "http://127.0.0.0:9090";
url = "http://localhost:9090";
orgId = 1;
}
{
name = "Prometheus-kariru";
type = "prometheus";
url = "http://192.168.1.54:9090";
orgId = 1;
}
{
name = "Prometheus-yuki";
type = "prometheus";
url = "http://192.168.1.36:9090";
orgId = 1;
}
{
name = "Prometheus-arashi";
type = "prometheus";
url = "http://192.168.1.211:9090";
orgId = 1;
}
];

View file

@ -5,12 +5,12 @@ _: {
{
job_name = "prometheus";
scrape_interval = "30s";
static_configs = [{targets = ["127.0.0.0:9090"];}];
static_configs = [{targets = ["localhost:9090"];}];
}
{
job_name = "node";
scrape_interval = "30s";
static_configs = [{targets = ["127.0.0.0:9100"];}];
static_configs = [{targets = ["localhost:9100"];}];
}
];
exporters = {

View file

@ -8,5 +8,6 @@
./homarr.nix
./dashdot.nix
./miniflux.nix
./prometheus.nix
];
}

View file

@ -0,0 +1,24 @@
_: {
networking.firewall.allowedTCPPorts = [9090];
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "prometheus";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9090"];}];
}
{
job_name = "node";
scrape_interval = "30s";
static_configs = [{targets = ["localhost:9100"];}];
}
];
exporters = {
node = {
enable = true;
enabledCollectors = ["systemd" "cpu"];
};
};
};
}