mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54: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 = {
|
||||
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'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue