hosts: init prometheus on hosts
All checks were successful
ci/woodpecker/push/checks Pipeline was successful
All checks were successful
ci/woodpecker/push/checks Pipeline was successful
This commit is contained in:
parent
a38d6f9846
commit
bdee5b8619
8 changed files with 99 additions and 6 deletions
|
@ -2,5 +2,6 @@ _: {
|
|||
imports = [
|
||||
./postgresql.nix
|
||||
./redis.nix
|
||||
./prometheus.nix
|
||||
];
|
||||
}
|
||||
|
|
24
hosts/arashi/services/prometheus.nix
Normal file
24
hosts/arashi/services/prometheus.nix
Normal 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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@ _: {
|
|||
imports = [
|
||||
./traefik.nix
|
||||
./torrent.nix
|
||||
./prometheus.nix
|
||||
];
|
||||
services.radarr = {
|
||||
enable = true;
|
||||
|
|
24
hosts/kariru/services/prometheus.nix
Normal file
24
hosts/kariru/services/prometheus.nix
Normal 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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
];
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -8,5 +8,6 @@
|
|||
./homarr.nix
|
||||
./dashdot.nix
|
||||
./miniflux.nix
|
||||
./prometheus.nix
|
||||
];
|
||||
}
|
||||
|
|
24
hosts/yuki/services/prometheus.nix
Normal file
24
hosts/yuki/services/prometheus.nix
Normal 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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue