Skip to content

Syslog parsing strategy #3645

Answered by dspruell
dspruell asked this question in Q&A
Discussion options

You must be logged in to vote

I prototyped the below, based on out_rewrite_tag_filter:

<source>
    @type syslog
    @label @SYSLOG
    tag syslog
    port 5140
    bind 0.0.0.0
</source>

<label @SYSLOG>
    <filter **>
        @type record_transformer
        <record>
            host "#{Socket.gethostname}"
            tag ${tag}
        </record>
    </filter>

    <match syslog.**>
        @type rewrite_tag_filter

        # Unbound query logs
        <rule>
            key message
            # "[62425:0] info: x.x.1.46 www.example.com. AAAA IN"
            pattern /info: \S+ \S+\. \S+ IN$/
            tag unbound.query
        </rule>

        # Unbound RPZ logs
        <rule>
            key message
          …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by fujimotos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants