summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/tests/internal/data/reload/yaml/processor.yaml
blob: 3021ee7e36bc25c5aa2e3257de1f712955806f72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
service:
    log_level: info
    http_server: on
    http_listen: 0.0.0.0
    http_port: 2021


pipeline:
    inputs:
      - name: random
        tag: test-tag
        interval_sec: 1

        processors:
          logs:
            - name: modify
              add: hostname monox

            - name: lua
              call: append_tag
              code: |
                  function append_tag(tag, timestamp, record)
                     new_record = record
                     new_record["tag"] = tag
                     return 1, timestamp, new_record
                  end

    outputs:
      - name: stdout
        match: '*'

        processors:
          logs:
            - name: lua
              call: add_field
              code: |
                  function add_field(tag, timestamp, record)
                     new_record = record
                     new_record["output"] = "new data"
                     return 1, timestamp, new_record
                  end