Sending a HTTP request on schedule

Hello,

I want to set up a Mikrotik hEX to send regular HTTPS requests to a specific address for external monitoring purposes.

The way I’ve figured out to do this is:

  1. Set up a script that does
/tool fetch url="https://my-url-here.example.org" mode=https output=none

Notes:

  • I added “output=none” to avoid needing the “write” policy.
  • I tried adding “check-certificate=yes” but the request didn’t work then. Does RouterOS use a limited or outdated root certificate store?
  1. Set up a scheduled task:

My question is – is this the optimal way to do this, or is there a neater, or more compact way? For example, is there a way to avoid having a script, but use the single command in the scheduler directly?

Thanks!

Use netwatch;
if you use url=“https://…” mode=https is unnecessary
you must install certs, if you want check https, for default no certs are installed.

Thanks for the tips!

Use netwatch;

Looks like on RouterOS v6 it can only do ICMP, and I first need to upgrade to v7.
On v7, looks like I can specify host by IP address and port, but it is not immediately obvious how I can specify an URL (with a domain name not an IP address, and with a path).

if you use url=“https://…” mode=https is unnecessary

Thanks, that works indeed!

you must install certs, if you want check https, for default no certs are installed.

Thanks, I see.

Sorry, I do not notice “6.49.15” version on picture