2024-05-08 15:54:35 +02:00
|
|
|
{
|
|
|
|
services.promtail = {
|
|
|
|
enable = true;
|
|
|
|
configuration = {
|
|
|
|
clients = [ { url = "http://saga:3100/loki/api/v1/push"; } ];
|
|
|
|
positions = {
|
|
|
|
filename = "/tmp/positions.yaml";
|
|
|
|
};
|
|
|
|
|
|
|
|
scrape_configs = [
|
|
|
|
{
|
|
|
|
job_name = "journal";
|
|
|
|
journal = {
|
|
|
|
labels = {
|
|
|
|
host = "valkyrie";
|
|
|
|
job = "systemd-journal";
|
|
|
|
};
|
|
|
|
max_age = "24h";
|
|
|
|
};
|
|
|
|
relabel_configs = [
|
|
|
|
{
|
|
|
|
source_labels = [ "__journal__systemd_unit" ];
|
|
|
|
target_label = "unit";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
2024-05-08 16:50:40 +02:00
|
|
|
{
|
|
|
|
job_name = "unbound";
|
|
|
|
static_configs = [
|
|
|
|
{
|
|
|
|
labels = {
|
|
|
|
job = "unbound";
|
|
|
|
__path__ = "/var/lib/unbound/unbound.log";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
pipeline_stages = [
|
|
|
|
{ labeldrop = [ "filename" ]; }
|
|
|
|
{
|
|
|
|
match = {
|
|
|
|
selector = ''{job="unbound"} |~ " start | stopped |.*in-addr.arpa."'';
|
|
|
|
action = "drop";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
match = {
|
|
|
|
selector = ''{job="unbound"} |= "reply:"'';
|
|
|
|
stages = [ { static_labels.dns = "reply"; } ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
match = {
|
|
|
|
selector = ''{job="unbound"} |~ "redirect |always_null|always_nxdomain"'';
|
|
|
|
stages = [ { static_labels.dns = "block"; } ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
2024-05-08 15:54:35 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
server = {
|
|
|
|
grpc_listen_port = 0;
|
|
|
|
http_listen_port = 28183;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|