This repository has been archived on 2024-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/hosts/carbon/services/monitoring/promtail.nix

40 lines
883 B
Nix
Raw Normal View History

{ pkgs, ... }: {
services.promtail = {
enable = true;
configuration =
{
server = {
http_listen_port = 0;
grpc_listen_port = 0;
};
clients = [
{ url = "https//32.54.31.99:3100/api/prom/push"; }
];
scrape_configs = [
{
job_name = "system";
pipeline_stages = [
{ replace = { expression = "(?:[0-9]{1,3}\\.){3}([0-9]{1,3})"; replace = "***"; }; }
];
static_configs = [
{
targets = [ "localhost" ];
labels = {
job = "nginx_access_log";
host = "carbon";
agent = "promtail";
__path__ = "/var/log/nginx/json_access.log";
};
}
];
}
];
};
};
}