mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-28 19:16:14 +01:00
Setup grok parsing for apache and nginx
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
0fef19e47e
commit
fd2ce42d15
|
@ -298,8 +298,25 @@ in
|
|||
|
||||
inputs.docker_log = {
|
||||
tags.bucket = "logs";
|
||||
source_tag = true;
|
||||
};
|
||||
|
||||
processors.parser = [
|
||||
{
|
||||
parse_fields = [ "message" ];
|
||||
merge = "override";
|
||||
data_format = "grok";
|
||||
|
||||
grok_patterns = ["%{COMBINED_LOG_FORMAT}"];
|
||||
|
||||
tagpass = {
|
||||
"grok_type" = [ "nginx" "apache" ];
|
||||
"_field" = singleton "message";
|
||||
};
|
||||
namepass = [ "docker_log" ];
|
||||
}
|
||||
];
|
||||
|
||||
outputs.influxdb_v2 = [
|
||||
{
|
||||
urls = singleton "http://${secret.network.ips.blowhole.ip or ""}:8086";
|
||||
|
|
|
@ -208,6 +208,10 @@ job "ingress" {
|
|||
nix_flake_sha = var.flake_sha
|
||||
nix_flake_store_path = var.store_path
|
||||
entrypoint = [ "init" ]
|
||||
|
||||
labels {
|
||||
grok_type = "nginx"
|
||||
}
|
||||
}
|
||||
|
||||
resources {
|
||||
|
|
Loading…
Reference in a new issue