I have a script that is to create a config. file and input some lines into it. But when I run the script, I get the error message:
line 2: filebeat.inputs:
- type: filestream
id: my-filestream-id
enabled: true
: bad substitution
Any idea what this means? and how i can fix it? I have shared the script below:
#!/bin/bash
cat > "config.yml" <<EOF
filebeat.inputs:
- type: filestream
id: my-filestream-id
enabled: true
paths:
- /home/ubuntu/logs/**/*.log
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.kibana:
output.logstash:
hosts: ["10.09.0.2:5044"]
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
EOF