Monitoring several url and setting schedule

Hello,
I use heartbeat module to monitor http responses, with Elastic v7.17.6.
I have to monitor several url.
Do I have to use this syntax :

heartbeat.monitors:
- type: http
  urls: ["http://url1", "http://url2", "http://url3" ]

or this one ?

heartbeat.monitors:
- type: http
    urls:
        - "http://url1"
        - "http://url2"
        - "http://url3"

And about the schedule, to test every 5 minutes, can I use : (I couldn't find it in the doc)

- type: http
  schedule: '@every 5m'

Or with the cron syntax, is it: ?

 - type: http
   schedule: '* */5 * * * *'

?
Thank you for your suggestions

Hi ppic,

Referring to this old blog post for guidance, , I think you can specify the urls in either format you have provided. The docs make reference to a list of urls, so if you are unsure or want to play safe go with option 1 of the list-based syntax over multiple lines.

On the schedule side, it accepts cron syntax which can be either of the formats you have suggested as per the documentation.

Hope that helps!

Hi Carly,

Thank you for your advice, it helps !
I was used to the crontab like in unix systems, with 5 fields for the period, so I was wondering...
I will try it monday and tell you.
Have a good we.

1 Like

Hi Carly,

It works as intended. Thanks.
I have now a new pb : it stopped pinging two days ago, while the windows service continued to work.
I don't see the pb in the log files.
I restarted the service and now it pings as expected.
I will close this topic and post a new one for this pb.

1 Like

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