Hi all,
I upgraded my full stack to 7.0 lately. This morning I noticed no heartbeat docs were coming in my elasticsearch. I started heartbeat with debug logs then I noticed it was not loading any monitors config files even if I have all my monitors in /etc/heartbeat/monitors.d/ as monitor1.yml monitor2.yml monitor3.yml. File permissions are right. I then changed the "path" config from:
path: ${path.config}/monitors.d/*.yml
to
path: /etc/heartbeat/monitors.d/*.yml
Now the monitors are detected and works fine. Weird?
Next even if I had configured my own template settings it created a template with the default options provided like if brand new heartbeat.yml config file was provided. I mean even if I named the template heartbeat-local it named it heartbeat-7.0.0. I also set my elasticsearch output to set the index name to heartbeat-%{+yyyy.MM} and it created the index as:
heartbeat-7.0.0-2019.04.29-000001
Now I agree I should include the version name in my index so I made simple changes on the index pattern and template name but I want those docs to be in monthly created index instead of daily. And I can't find a workaround to have the configuration file read correctly my index name pattern...
My configuration file is correctly loaded by heartbeat since i can actually switch the log levels and change the reload.enabled config successfully.
Here's my heartbeat.yml:
heartbeat.config.monitors:
#path: ${path.config}/monitors.d/*.yml
path: /etc/heartbeat/monitors.d/*.yml
reload.enabled: true
reload.period: 5s
name: local-heartbeat-monitor
setup.kibana:
host: "<ip>:<port>"
output.elasticsearch:
hosts: ["<ip>:<port>"]
index: "heartbeat-%{[agent.version]}-%{+yyyy.MM}"
setup.template.name: "heartbeat-%{[agent.version]}"
setup.template.pattern: "heartbeat-%{[agent.version]}-*"
setup.template.overwrite: false
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
logging.level: info
logging.to_files: true
logging.files:
path: "/var/log/heartbeat/logs"
name: heartbeat.log
keepfiles: 7
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch:
Thanks