How to Configure watch.poll_file in heartbeat.yml file

Hi Team,

I am trying to use watch.poll_file in heartbeat.yml file. But facing error.

|2018-03-10T21:01:02.113+0530|ERROR|beater/manager.go:176|Failed parsing job schedule: %!(EXTRA ucfg.baseError=missing required field accessing 'schedule')|
|---|---|---|---|
|2018-03-10T21:01:02.113+0530|ERROR|beater/manager.go:140|failed to load monitor tasks: missing required field accessing 'schedule'|

Please Find below steps I have follow to configure watch.poll_file

  1. Create urls.json file with below content.
    {"urls": ["http://google.com"]}

  2. Update heartbeat.yml file with below content.
    heartbeat.monitors:
    - type: http
    watch.poll_file:
    path : "<Static Location Path>\urls.json"
    schedule: '@every 10s'

Can you please help me to solve this problem.

Thanks,
Vaishal

Hi @dsvaishal,

Indentation looks wrong in your example, all the different fields should start in the same column as type: http

Hi @exekias

Thanks for your reply.

Is it working for you? If yes can you please share some sample example you had configured.