Welcome to the Linux Foundation Forum!

Does the code sequence matter inside the directive or between directives?

Is there a difference between the code sequence inside the directives as well as the order of directive in match or source?

e.g., does the order of these codes matter?

<source>
    @type tail
    path /tmp/fluent/*.log
    tag local.logs
    pos_file /tmp/fluent/lab2.tail.pos
    <parse>
        @type none
    </parse>
</source>

versus

<source>
    @type tail
    path /tmp/fluent/*.log
    <parse>
        @type none
    </parse>
    tag local.logs
    pos_file /tmp/fluent/lab2.tail.pos
</source>

Comments

  • ChristianLacsina964
    edited May 12

    Within directives, no. As long as the required keys and values are present and well-formed, they will work identically.

    Order of directives (like in cases with multiple <match> directives) is what matters. The first directive that an event qualifies for will take that event out of the pipeline.

Categories

Upcoming Training