Jegadeesh
06/25/2025, 7:40 AMPat
06/25/2025, 8:03 AMJegadeesh
06/25/2025, 10:27 AMPat
06/25/2025, 10:28 AMJegadeesh
06/25/2025, 10:28 AM[SERVICE]
# Flush
# =====
# set an interval of seconds before to flush records to a destination
flush 30
# Daemon
# ======
# instruct Fluent Bit to run in foreground or background mode.
daemon Off
# Log_Level
# =========
log_level debug
log_file fluentbit.log
# Parsers File
# ============
# specify an optional 'Parsers' configuration file
parsers_file parsers.conf
# Plugins File
# ============
# specify an optional 'Plugins' configuration file to load external plugins.
plugins_file plugins.conf
# HTTP Server
# ===========
# Enable/Disable the built-in HTTP Server for metrics
http_server Off
http_listen 0.0.0.0
http_port 2020
storage.metrics on
[INPUT]
Name winlog
Tag winlog
Channels Application,System,Security,Microsoft-Windows-TaskScheduler/Operational,Microsoft-Windows-SMBServer/Audit,Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
Interval_Sec 10
DB winlog.sqlite
[FILTER]
Name aws
Match winlog
imds_version v2
ec2_instance_id true
hostname true
[OUTPUT]
Name s3
Match winlog
bucket ops-bucket-test
upload_timeout 1m
s3_key_format /fluent-bit-logs/$TAG/%Y/${HOSTNAME}/%m/%d/%H/%M/%S
store_dir s3-buffer
total_file_size 1M
[INPUT]
name tail
Tag xx_assist_app
path C:\Program Files\xxxxx\yyyyyyy\Logs\Admin\xxxxxx\*
Path_Key filename
DB tail.sqlite
read_from_head true
multiline.parser multiline-regex
[INPUT]
name tail
Tag xx_assist_app
path C:\Program Files\xxxxx\yyyyyyy\Logs\Admin\xxxxxx\*
Path_Key filename
DB tail.sqlite
read_from_head true
multiline.parser multiline-anchor
[INPUT]
name tail
Tag xx_assist_app
path C:\Program Files\xxxxx\yyyyyyy\Logs\Admin\xxxxxx\*
Path_Key filename
DB tail.sqlite
read_from_head true
multiline.parser multiline-anchor
[FILTER]
Name lua
Match xx_assist_app
Script extract_filename.lua
Call extract_filename
[FILTER]
Name record_modifier
Match xx_assist_app
Record hostname ${HOSTNAME}
[OUTPUT]
name loki
match xx_assist_app
Host loki-xx-dev-in.internal
port 443
tls on
tls.verify off
labels job=Classix-App, instance=${HOSTNAME}, filename=$filenameJegadeesh
06/25/2025, 10:29 AMJegadeesh
06/25/2025, 10:30 AMJegadeesh
06/25/2025, 10:30 AM[MULTILINE_PARSER]
name multiline-regex
type regex
flush_timeout 1000
#
# Regex rules for multiline parsing
# ---------------------------------
#
# configuration hints:
#
# - first state always has the name: start_state
# - every field in the rule must be inside double quotes
#
# rules | state name | regex pattern | next state
# ------|---------------|--------------------------------------------
rule "start_state" "/(^[A-Za-z]{3}-\d{2}-\d{4}\s\d+\:\d+\:\d+)(.*)/" "cont"
rule "cont" "/^(?![A-Za-z]{3}-\d{2}-\d{4}\s\d+\:\d+\:\d+).+/" "cont"
[MULTILINE_PARSER]
name multiline-anchor
type regex
flush_timeout 1000
rule "start_state" "/(^AetherPal\.)(\w+)(.*)/" "cont"
rule "cont" "/^(?!AetherPal\.)(\w+)(.*)/" "cont"Jegadeesh
06/25/2025, 10:31 AMJegadeesh
06/25/2025, 10:31 AMfunction extract_filename(tag, ts, record)
local path = record["filename"]
if path ~= nil then
local normalized = path:gsub("\\\\", "/"):gsub("\\", "/")
local base = normalized:match("^.+/(.+)$") or normalized
record["filename"] = base -- overwrite the original field
end
return 1, ts, record
endJegadeesh
06/25/2025, 10:31 AMPat
06/25/2025, 10:32 AMJegadeesh
06/25/2025, 11:01 AMJegadeesh
06/25/2025, 11:02 AMPat
06/25/2025, 11:02 AMJegadeesh
06/25/2025, 11:02 AMPat
06/25/2025, 11:03 AMJegadeesh
06/25/2025, 11:04 AMJegadeesh
06/25/2025, 11:04 AMJegadeesh
06/25/2025, 11:05 AMPat
06/25/2025, 11:05 AMJegadeesh
06/25/2025, 11:06 AMPat
06/25/2025, 11:06 AMJegadeesh
06/25/2025, 11:06 AM