{{ if eq .input "file" }}

type: log
paths:
{{ range $i, $path := .paths }}
  - {{$path}}
{{ end }}
exclude_files: [".gz$"]

{{ else if eq .input "syslog" }}

type: syslog
protocol.{{.syslog_protocol}}:
  host: "{{.syslog_host}}:{{.syslog_port}}"

{{ end }}

tags: {{.tags | tojson}}
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}

processors:
  - add_locale: ~
  - add_fields:
      target: ''
      fields:
        ecs.version: 1.12.0
  - script:
      lang: javascript
      id: cisco_ios
      file: ${path.home}/module/cisco/ios/config/pipeline.js
