| {%- if pillar.get('fluentd', {}).get('agent', {}).get('enabled', False) %} |
| {%- set positiondb = pillar.fluentd.agent.dir.positiondb %} |
| agent: |
| config: |
| label: |
| ceph: |
| input: |
| tail_ceph-osd: |
| type: tail |
| tag: ceph.osd |
| path: /var/log/ceph/ceph-osd* |
| path_key: log_location |
| pos_file: {{ positiondb }}/ceph.osd.pos |
| parser: |
| type: regexp |
| time_key: Timestamp |
| time_format: '%Y-%m-%d %H:%M:%S.%N' |
| keep_time_key: false |
| format: >- |
| '/^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{6}) (?<Payload>.*)/' |
| tail_ceph-mon: |
| type: tail |
| tag: ceph.mon |
| path: /var/log/ceph/ceph-mon*, /var/log/ceph/ceph.log, /var/log/ceph/ceph.audit.log |
| path_key: log_location |
| pos_file: {{ positiondb }}/ceph.mon.pos |
| parser: |
| type: regexp |
| time_key: Timestamp |
| time_format: '%Y-%m-%d %H:%M:%S.%N' |
| keep_time_key: false |
| format: >- |
| '/^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{6}) (?<Payload>.*)/' |
| tail_ceph-mgr: |
| type: tail |
| tag: ceph.mgr |
| path: /var/log/ceph/ceph-mgr* |
| path_key: log_location |
| pos_file: {{ positiondb }}/ceph.mgr.pos |
| parser: |
| type: regexp |
| time_key: Timestamp |
| time_format: '%Y-%m-%d %H:%M:%S.%N' |
| keep_time_key: false |
| format: >- |
| '/^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{6}) (?<Payload>.*)/' |
| tail_radosgw: |
| type: tail |
| tag: ceph.radosgw |
| path: /var/log/ceph/ceph-rgw* |
| path_key: log_location |
| pos_file: {{ positiondb }}/ceph.radosgw.pos |
| parser: |
| type: regexp |
| time_key: Timestamp |
| time_format: '%Y-%m-%d %H:%M:%S.%N' |
| keep_time_key: false |
| format: >- |
| '/^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{6}) (?<Payload>.*)$/' |
| |
| filter: |
| match_severity: |
| type: record_transformer |
| tag: ceph.** |
| enable_ruby: true |
| record: |
| - name: programname |
| value: ceph |
| - name: severity_label |
| value: INFO |
| - name: Severity |
| value: 6 |
| match: |
| push_to_default: |
| tag: ceph.* |
| type: relabel |
| label: default_output |
| |
| {%- endif %} |