Actions67
- Interface Actions
- Firewall Address List Actions
- IP Pool Actions
- ARP Actions
- DHCP Server Actions
- IP Address Actions
- Hotspot Actions
- Queue Simple Actions
- Wireless Actions
- System Actions
- System Clock Actions
- System Identity Actions
- System Script Actions
- System Scheduler Actions
- IP Service Actions
- Netwatch Actions
- Log Actions
- Custom Command Actions
Netwatch → Set
AI-generatedSummary
Sets a netwatch monitor entry on a MikroTik device.
Inputs
- targetId (required) — ID (*1, *2) or Name (e.g. ether1, user1) of the netwatch entry to set.
- netwatchHost — IP address or hostname to monitor (optional).
- netwatchInterval — Interval between checks (e.g. 1m, 30s); defaults to 1m if omitted.
- netwatchTimeout — Timeout for checks (e.g. 1s, 500ms); defaults to 1s if omitted.
- netwatchUpScript — Script to run when the host comes up (optional).
- netwatchDownScript — Script to run when the host goes down (optional).
- commentText — Comment to associate with the netwatch entry (optional).
Output shape
{ resource, operation, count, data }
data contains the RouterOS response; count is 1 for single entries or the array length.
Examples
Example 1: Set netwatch entry with custom host, interval, and timeout.
targetId: *1; netwatchHost: 192.168.1.100; netwatchInterval: 30s; netwatchTimeout: 2s