Hi,
Just wondering if anyone have successfully used the watch.poll_file option for icmp monitoring?
I tried following the sample from here, but got the error: Exiting: error loading config file: yaml: line 30: mapping values are not allowed in this context
Line 30 was the "interval: 5s" line, so I removed it, which removed the error, but nothing seem to happen.
I tried using HTTP instead of ICMP, that worked no problems. Even in the logs, I can see:
scheduler.go:294: INFO Scheduled job 'http@http://google.com' already active.
I'm using the Dockerized Heartbeat (docker.elastic.co/beats/heartbeat) version 6.3.0 and 5.6.4, with the same result.
My heartbeat.yml has:
- type: http
schedule: '@every 15s'
urls: ["http://google.com"]
watch.poll_file:
path: /etc/heartbeat/monitors/http_urls.json
- type: icmp
schedule: '@every 10s'
hosts: ["localhost"]
ipv6: false
mode: any
watch.poll_file:
path:/etc/heartbeat/monitors/icmp_hosts.json
http_urls.json:
{"urls": ["http://google.com"]} {"urls": ["http://youtube.com"]}
icmp_hosts.json:
{"hosts": ["host01"]} {"hosts": ["host02"]}
Where HTTP worked, and ICMP doesn't.
Any help is appreciated. Thanks.