MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

Netwatch → Add

AI-generated

Summary

Add a netwatch host monitor

Inputs

  • netwatchHost — IP address or hostname to monitor
  • netwatchInterval — Interval between checks (e.g. 1m, 30s)
  • netwatchTimeout — Timeout for checks (e.g. 1s, 500ms)
  • netwatchUpScript — Script to run when host comes up
  • netwatchDownScript — Script to run when host goes down
  • commentText — Comment for the netwatch entry

Output shape

{ resource, operation, count, data } from node execution; response keys are cleaned (hyphens and slashes replaced with underscores) if cleanKeys is enabled

Returns per-item results after RouterOS command execution.

Examples

Example 1: Add a basic netwatch monitor

netwatchHost=192.168.1.99, netwatchInterval=5m, netwatchTimeout=2s

Example 2: Add netwatch with scripts and global options

netwatchHost=10.0.0.1, netwatchUpScript=/system/script/run name=myScript, netwatchDownScript=/system/script/run name=downScript, connectionAttempts=3, connectionDelay=2, tag=42

Links

Discussion