Heartbeat (7.16.3) - missing required field accessing 'schedule'

My heartbeat monitoring is working just fine, but syslog is flooded with error messages like this:

Jan 19 08:51:38 bslog1 heartbeat[32480]: 2022-01-19T08:51:38.532+0100	ERROR	[reload]	cfgfile/list.go:99	Error creating runner from config: could not parse cfg for datastream error unpacking monitor plugin config: missing required field accessing 'schedule'

The config files have entries like these:

- type: http
  schedule: '@every 90s'
  tags:
    - 'example'
  name: 'Example'
  urls:
    - 'https://www.example.com'
  check.request:
    method: GET
  check.response.status: 200
  check.response.body: 'Some text'

And I mean "flooded" literally, there are dozens every minute. What could be wrong here?

Hi @jurgenhaas,

Thank you for your first post and welcome to the community!

Is this the only monitor in your YAML? And, which version of heartbeat you are on?

It's version 7.16.3, see topic title.

I'm having 7 config files in /etc/heartbeat/monitors.d and each of them have multiple entries like the one above.

Those config files get created by a template in Ansible, so it is verified, that each of them has a schedule entry.

7.1 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

It's not 7.1, it's 7.16.3

7.1 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

@jurgenhaas apologies, I didn't notice the version in title. Also, please disregard the automated version warnings.

I tried to reproduce the issue but couldn't. Can you do us a favor and check which particular file is causing the error. Then, you can check yourself if anything is wrong there, or paste the source here if you couldn't.

You can check a particular file by disabling all others. Under your monitors.d directory, rename all the files so that they end with .disabled e.g. to test the file sample.http.yml your monitors.d should have:

  • sample.http.yml
  • sample.icmp.yml.disabled
  • sample.tcp.yml.disabled

Then from hearbeat's root directory, run ./heartbeat -e. If there's error in config, you'll see the ERROR line in logs. Otherwise, you'll only see INFO lines.

1 Like

@abdulz thanks a lot for the instructions. That in fact revealed the issue and it was unnoticed in our Ansible template for years :frowning:

We have http checks from many different sources, each of which have their own section in that template. And one of them really had the missing schedule setting.

Glad we figured that out and thanks for your support.

1 Like

@jurgenhaas pleasure that the problem is resolved. :slight_smile:

Yeah it's not a very smart bot is it!. We've disabled it for the time being.

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