mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-23 17:35:38 +02:00
This commit is contained in:
parent
fc6553dd22
commit
2c2d16f3f8
|
@ -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 = {
|
||||
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'';
|
||||
|
|
|
@ -50,13 +50,6 @@ lib.makeScope pkgs.newScope (
|
|||
src = ./node-systemd.json; # sadly only imported dashboards work
|
||||
});
|
||||
|
||||
nginx = buildGrafanaDashboard {
|
||||
id = 12708;
|
||||
pname = "nginx";
|
||||
version = "1";
|
||||
hash = "sha256-T1HqWbwt+i/We+Y2B7hcl3CijGxZF5QI38aPcXjk9y0=";
|
||||
};
|
||||
|
||||
nextcloud =
|
||||
(buildGrafanaDashboard {
|
||||
id = 9632;
|
||||
|
|
Loading…
Reference in a new issue