Snippets

xchandan fluent-bit

Created by xchandan last modified
[SERVICE]
    # Flush
    # =====
    # Set an interval of seconds before to flush records to a destination
    Flush        5

    # Daemon
    # ======
    # Instruct Fluent Bit to run in foreground or background mode.
    Daemon       Off

    # Log_Level
    # =========
    # Set the verbosity level of the service, values can be:
    #
    # - error
    # - warning
    # - info
    # - debug
    # - trace
    #
    # By default 'info' is set, that means it includes 'error' and 'warning'.
    Log_Level    info

    # Parsers_File
    # ============
    # Specify an optional 'Parsers' configuration file
    Parsers_File parsers.conf
    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

    Name exec
    Command "/usr/bin/supervisorctl status"
    Interval_Sec 120
    Tag  sa_monitoring

[INPUT]
    Name          tcp
    Tag		  sa_logs
    Host          0.0.0.0
    Port          5000
    Format	  json

[INPUT]
    Name          tcp
    Tag		  sa_monitoring
    Host          0.0.0.0
    Port          5001
    Format	  json

[INPUT]
    Name          tcp
    Tag		  sa_stats
    Host          0.0.0.0
    Port          5002
    Format	  json

[OUTPUT]
    Name          file
    Match	  sa_logs
    Path          /opt/ns/log/sa/combined.log

[OUTPUT]
    Name          file
    Match	  sa_monitoring
    Path          /opt/ns/monitor/sa/combined.log

[OUTPUT]
    Name          file
    Match	  sa_stats
    Path          /opt/ns/stats/sa/combined.log
[SERVICE]
    # Flush
    # =====
    # Set an interval of seconds before to flush records to a destination
    Flush        5

    # Daemon
    # ======
    # Instruct Fluent Bit to run in foreground or background mode.
    Daemon       Off

    # Log_Level
    # =========
    # Set the verbosity level of the service, values can be:
    #
    # - error
    # - warning
    # - info
    # - debug
    # - trace
    #
    # By default 'info' is set, that means it includes 'error' and 'warning'.
    Log_Level    info

    # Parsers_File
    # ============
    # Specify an optional 'Parsers' configuration file
    Parsers_File parsers.conf
    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

[INPUT]
    Name tail
    Path /opt/ns/log/sa-*.log
    DB /opt/ns/log/cursor_state.db
    DB.Sync Normal
    Buffer_Max_Size 5MB
    Buffer_Chunk_Size 400k
    Mem_Buf_Limit 20M
    Tag  sa_logs
    
[INPUT]
    Name cpu
    Tag  sa_stats
    Interval_Sec 120

[INPUT]
    Name memory
    Tag  sa_stats
    Interval_Sec 120

[INPUT]
    Name exec
    Command /usr/bin/supervisorctl status
    Interval_Sec 120
    Tag  sa_monitoring

[FILTER]
    Name record_modifier
    Match *
    Record hostname ${HOSTNAME}

[OUTPUT]
    Name          tcp
    Match         sa_logs
    Host          sa-monitor-01.pe.local
    Port          5000
    Format	  json_lines

[OUTPUT]
    Name          tcp
    Match         sa_monitoring
    Host          sa-monitor-01.pe.local
    Port          5001
    Format	  json_lines

[OUTPUT]
    Name          tcp
    Match         sa_stats
    Host          sa-monitor-01.pe.local
    Port          5002
    Format	  json_lines

#[OUTPUT]
#    Name stdout

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.