ansible playbooks for retailor.io infrastructure

This commit is contained in:
2025-03-03 19:33:36 +01:00
committed by KevinMidboe
commit 92cb10ba27
139 changed files with 33603 additions and 0 deletions
@@ -0,0 +1,17 @@
input {
beats {
port => 5045
}
}
filter {
}
output {
elasticsearch {
index => "laravel-logs-%{+YYYY.MM}"
hosts => "${ELASTIC_HOSTS}"
user => "elastic"
password => "${ELASTIC_PASSWORD}"
}
}
@@ -0,0 +1,24 @@
input {
beats {
port => 5044
}
}
filter {
if [pipeline_id] == "nginx" {
mutate { add_field => { "route" => "nginx_pipeline" } }
} else if [pipeline_id] == "laravel" {
mutate { add_field => { "route" => "laravel_pipeline" } }
}
}
output {
if [pipeline_id] == "nginx" {
pipeline { send_to => "nginx_pipeline" }
} else if [pipeline_id] == "laravel" {
pipeline { send_to => "laravel_pipeline" }
} else {
# Handle unknown cases
stdout { codec => rubydebug }
}
}
@@ -0,0 +1,39 @@
input {
beats {
port => 5044
}
}
filter {
grok {
match => [ "message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}"]
overwrite => [ "message" ]
}
mutate {
convert => ["response", "integer"]
convert => ["bytes", "integer"]
convert => ["responsetime", "float"]
}
# geoip {
# source => "clientip"
# add_tag => [ "nginx-geoip" ]
# }
date {
match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ]
remove_field => [ "timestamp" ]
}
# useragent {
# source => "agent"
# }
}
output {
elasticsearch {
index => "weblogs-%{+YYYY.MM}"
hosts => "${ELASTIC_HOSTS}"
user => "elastic"
password => "${ELASTIC_PASSWORD}"
document_type => "nginx_logs"
}
}