mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
This commit is contained in:
parent
fc6553dd22
commit
2c2d16f3f8
2 changed files with 0 additions and 23 deletions
|
@ -49,26 +49,10 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
job_name = "nginx";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [ "localhost" ];
|
|
||||||
labels = {
|
|
||||||
job = "nginx";
|
|
||||||
__path__ = "/var/log/nginx/*.log";
|
|
||||||
host = config.networking.hostName;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# otherwise access to the log is denied
|
|
||||||
users.users.promtail.extraGroups = [ "nginx" ];
|
|
||||||
|
|
||||||
my.services.prometheus.rules = {
|
my.services.prometheus.rules = {
|
||||||
promtail_request_errors = {
|
promtail_request_errors = {
|
||||||
condition = ''100 * sum(rate(promtail_request_duration_seconds_count{status_code=~"5..|failed"}[1m])) by (namespace, job, route, instance) / sum(rate(promtail_request_duration_seconds_count[1m])) by (namespace, job, route, instance) > 10'';
|
condition = ''100 * sum(rate(promtail_request_duration_seconds_count{status_code=~"5..|failed"}[1m])) by (namespace, job, route, instance) / sum(rate(promtail_request_duration_seconds_count[1m])) by (namespace, job, route, instance) > 10'';
|
||||||
|
|
|
@ -50,13 +50,6 @@ lib.makeScope pkgs.newScope (
|
||||||
src = ./node-systemd.json; # sadly only imported dashboards work
|
src = ./node-systemd.json; # sadly only imported dashboards work
|
||||||
});
|
});
|
||||||
|
|
||||||
nginx = buildGrafanaDashboard {
|
|
||||||
id = 12708;
|
|
||||||
pname = "nginx";
|
|
||||||
version = "1";
|
|
||||||
hash = "sha256-T1HqWbwt+i/We+Y2B7hcl3CijGxZF5QI38aPcXjk9y0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nextcloud =
|
nextcloud =
|
||||||
(buildGrafanaDashboard {
|
(buildGrafanaDashboard {
|
||||||
id = 9632;
|
id = 9632;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue