rico0: push caddy logs to loki

This commit is contained in:
Adithya 2024-09-14 20:45:30 +05:30
parent 804eea4bb0
commit 9187555785
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C

View file

@ -15,6 +15,29 @@
]; ];
positions = { filename = "/tmp/promtail-positions.yaml"; }; positions = { filename = "/tmp/promtail-positions.yaml"; };
scrape_configs = [ scrape_configs = [
{
job_name = "caddy";
static_configs = [
{
targets = [ "localhost" ];
labels = {
job = "caddy";
"__path__" = "/var/log/caddy/*log";
agent = "caddy-promtail";
};
}
];
pipeline_stages = [
{
json = {
expressions = { duration = "duration"; status = "status"; };
};
}
{
labels = { duration = ""; status = ""; };
}
];
}
{ {
job_name = "journal"; job_name = "journal";
journal = { journal = {