# How to Configure watch.poll\_file in heartbeat.yml file

**URL:** <https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [March 10, 2018, 2:17pm UTC](https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391 "2018-03-10T14:17:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsvaishal](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dsvaishal](https://discuss.elastic.co/u/dsvaishal)\
**Post date:** [March 10, 2018, 2:17pm UTC](https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391/1 "2018-03-10T14:17:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [March 12, 2018, 4:07pm UTC](https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391/2 "2018-03-12T16:07:27Z")

</div>

Hi @dsvaishal,

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

---

<div class="post-metadata">

**Author:** ![dsvaishal](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dsvaishal](https://discuss.elastic.co/u/dsvaishal)\
**Post date:** [March 13, 2018, 6:33am UTC](https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391/3 "2018-03-13T06:33:43Z")

</div>

Hi @exekias

Thanks for your reply.

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 10, 2018, 6:33am UTC](https://discuss.elastic.co/t/how-to-configure-watch-poll-file-in-heartbeat-yml-file/123391/4 "2018-04-10T06:33:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
