Skip to content

Command Reference

check_routeros

Usage:

check_routeros [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--host text Hostname or IP address of the device to connect to _required
--hostname text Use this hostname to check the SSL certificates None
--port text The port to use. Defaults to 8728 for non SSL connections and 8729 for SSL connections None
--username text The username of the monitoring user. Do NOT use a user with admin privileges _required
--password text The password of the monitoring user _required
--connection-timeout integer The connection timeout (Default: 10 seconds). Set to 0 to disable timeout, but be careful. 10
--routeros-version text Version of RouterOS running on the device. The value 'auto' is special and if set the check will try to detect the version automatically. The 'auto' option is recommended. Examples: '6', '6.48.8', '7', '7.8', 'auto' (Default: auto) auto
--ssl / --no-ssl boolean Use a SSL encrypted connections to communicate with the device True
--ssl-cafile text Custom CA file to check SSL certificates None
--ssl-capath text Custom path to look for CA files to check SSL certificates None
--ssl-force-no-certificate boolean Force an anonymous connection False
--ssl-verify / --no-ssl-verify boolean Verify the SSL certificate True
--ssl-verify-hostname / --no-ssl-verify-hostname boolean N/A True
-v, --verbose integer range (0 and above) N/A 0
--help boolean Show this message and exit. False

Subcommands

  • interface: Check the state and the stats of interfaces
  • interface.gre: Check the state of a GRE interface.
  • interface.vrrp: Check the state of VRRP interfaces
  • routing.bgp.peers: No description was provided with this command.
  • routing.ospf.neighbors: Check the state of an OSPF neighbor
  • system.clock: This command reads the information from /system/clock to extract the required information.
  • system.cpu: This command reads the information from /system/resource and /system/resource/cpu to extract the required
  • system.disk: No description was provided with this command.
  • system.fan: No description was provided with this command.
  • system.license: No description was provided with this command.
  • system.memory: No description was provided with this command.
  • system.ntp.client:
  • system.power: Check the total power consumption of a device. This might not be available on all devices
  • system.psu: Check the power supply units (PSU)
  • system.temperature: This command reads the information from /system/health and extracts all values containing the
  • system.update: No description was provided with this command.
  • system.uptime: Get Uptime of a device
  • tool.ping: Execute a ping command on the device to check other devices
check_routeros interface

Check the state and the stats of interfaces

Usage:

check_routeros interface [OPTIONS]

Options:

Name Type Description Default
--name text The name of the GRE interface to monitor. This can be specified multiple times []
--regex boolean Treat the specified names as regular expressions and try to find all matching interfaces. (Default: not set) False
--single boolean If set the check expects the interface to exist False
--ignore-disabled / --no-ignore-disabled boolean Ignore disabled interfaces True
--cookie-filename text The filename to use to store the information to calculate the rate. '{name}' will be replaced with the interface name. Also '{host}' and '{hostname}' will be replaced with the values provided as commandline options. You must create uniq filenames to get the correct rate. (Default: /tmp/check_routeros_interface_{name}.data) If multiple devices are checked use something like: /tmp/check_routeros_interface_{host}_{name}.data /tmp/check_routeros_interface_{name}.data
--value-default text Set a default value if the value is not provided by RouterOS. Format of the value must be compatible with RouterOS values. Example: Set the default speed value for interfaces: --value-override speed:10Gbps Looks like there is a bug where RouterOS does not report the current speed of the interface (RouterOS 7.8 - 7.14.2?). None
--value-override text Override a value read from the RouterOS device. Format of the value must be compatible with RouterOS values. Example: Override/Set the speed value for bridges or tunnels: --value-override speed:10Gbps None
--value-warning text Set a warning threshold for a value. Example: If cpu1-load should be in the range of 10% to 20% you can set --value-warning cpu-load:10:200 Can be specified multiple times None
--value-critical text Set a critical threshold for a value. Example: If cpu1-load should be in the range of 10% to 20% you can set --value-critical cpu-load:10:200 Can be specified multiple times None
--help boolean Show this message and exit. False
check_routeros interface.gre

Check the state of a GRE interface.

Usage:

check_routeros interface.gre [OPTIONS]

Options:

Name Type Description Default
--name text The name of the GRE interface to monitor. This can be specified multiple times []
--regex boolean Treat the specified names as regular expressions and try to find all matching interfaces. (Default: not set) False
--single boolean If set the check expects the interface to exist False
--ignore-disabled / --no-ignore-disabled boolean Ignore disabled interfaces True
--help boolean Show this message and exit. False
check_routeros interface.vrrp

Check the state of VRRP interfaces

Usage:

check_routeros interface.vrrp [OPTIONS]

Options:

Name Type Description Default
--name text The name of the VRRP interface to check _required
--master boolean If set the interface must be master False
--help boolean Show this message and exit. False
check_routeros routing.bgp.peers

Usage:

check_routeros routing.bgp.peers [OPTIONS]

Options:

Name Type Description Default
--name text The name of the BGP peer to check. This can be specified multiple times []
--regex boolean Treat the specified names as regular expressions and try to find all matching peers. (Default: not set) False
--single boolean If set the check expects the peer to exist False
--help boolean Show this message and exit. False
check_routeros routing.ospf.neighbors

Check the state of an OSPF neighbor

Usage:

check_routeros routing.ospf.neighbors [OPTIONS]

Options:

Name Type Description Default
--area text The area the neighbor router belongs to (only supported on RouterOS v7.x None
--instance text The name of the OSPF instance _required
--router-id text The ID of the neighbor router _required
--help boolean Show this message and exit. False
check_routeros system.clock

This command reads the information from /system/clock to extract the required information.

Usage:

check_routeros system.clock [OPTIONS]

Options:

Name Type Description Default
--warning float Warning threshold for time diff in seconds None
--critical float Critical threshold for time diff in seconds None
--help boolean Show this message and exit. False
check_routeros system.cpu

This command reads the information from /system/resource and /system/resource/cpu to extract the required information.

Usage:

check_routeros system.cpu [OPTIONS]

Options:

Name Type Description Default
--load-warning text Warning threshold for global cpu load None
--load-critical text Critical threshold for global cpu load None
--value-warning text Set a warning threshold for a value. Example: If cpu1-load should be in the range of 10% to 20% you can set --value-warning cpu-load:10:200 Can be specified multiple times None
--value-critical text Set a critical threshold for a value. Example: If cpu1-load should be in the range of 10% to 20% you can set --value-critical cpu-load:10:200 Can be specified multiple times None
--regex boolean Treat values from --value-warning and --value-critical as regex to find all matching values.Example: Warn if cpu load of at least one CPU is above 80%: --value-warning 'cpu\d+-load:80' False
--help boolean Show this message and exit. False
check_routeros system.disk

Usage:

check_routeros system.disk [OPTIONS]

Options:

Name Type Description Default
--used / --free boolean Set if used or free memory should be checked. (Default: used) True
--warning text Warning threshold in % or MB. Example (20% oder 20 = 20MB) _required
--critical text Critical threshold in % or MB. Example (20% oder 20 = 20MB) _required
--bad-blocks-warning text Warning threshold for bad blocks. Example: 20 -> 20% bad blocks None
--bad-blocks-critical text Critical threshold for bad blocks None
--help boolean Show this message and exit. False
check_routeros system.fan

Usage:

check_routeros system.fan [OPTIONS]

Options:

Name Type Description Default
--value-warning text Set a warning threshold for a value. Example: If fan1-speed should be in the range of 4000 to 5000 you can set --value-warning fan1-speed:4000:5000 Can be specified multiple times None
--value-critical text Set a critical threshold for a value. Example: If fan1-speed should be in the range of 4000 to 5000 you can set --value-critical fan1-speed:4000:5000 Can be specified multiple times None
--regex boolean Treat values from --value-warning and --value-critical as regex to find all matching values False
--no-fan-ok boolean The check will be unknown if no fan is available. Provide this option to ignore this. False
--expect-fan text Name of the fan to expect. Can be specified multiple times. []
--help boolean Show this message and exit. False
check_routeros system.license

Usage:

check_routeros system.license [OPTIONS]

Options:

Name Type Description Default
--deadline-warning text Number of days until deadline is reached (Default: '28:') 28:
--deadline-critical text Number of days until deadline is reached (Default: '14:') 14:
--next-renewal-warning text Number of days until renewal is done (Default: None, Example: '-14:') None
--next-renewal-critical text Number of days until renewal is done (Default: None) None
--level text Allowed license levels. Repeat to use multiple values. None
--help boolean Show this message and exit. False
check_routeros system.memory

Usage:

check_routeros system.memory [OPTIONS]

Options:

Name Type Description Default
--used / --free boolean Set if used or free memory should be checked. (Default: used) True
--warning text Warning threshold in % or MB. Example (20% oder 20 = 20MB) _required
--critical text Critical threshold in % or MB. Example (20% oder 20 = 20MB) _required
--help boolean Show this message and exit. False
check_routeros system.ntp.client

This command reads the information from /system/ntp/client to extract the required information.

It checks if is the NTP client enabled, if the NTP server is reachable and if is the offset in the threshold.

Usage:

check_routeros system.ntp.client [OPTIONS]

Options:

Name Type Description Default
--last-update-before-warning float The time from the NTP server should at least be synchronised in the last N seconds. Default: 30 minutes = 1800 seconds Note: This is only available on RouterOS 6.x 1800
--last-update-before-critical float The time from the NTP server should at least be synchronised in the last N seconds. Default: 60 minutes = 3600 seconds Note: This is only available on RouterOS 6.x 3600
--offset-warning float Warning threshold for offset from the NTP server in seconds 10.0
--offset-critical float Critical threshold for offset from the NTP server in seconds 30.0
--stratum-warning integer Check the stratum and report warning state if it does not match. Note: The stratum is only available on RouterOS 7.x None
--stratum-critical integer Check the stratum and report critical state if it does not match. Note: The stratum is only available on RouterOS 7.x None
--expected-server text Address of the ntp server we expect to get our time from. This must be the IPv4/IPv6 address and not the FQDN. It can be provided multiple times. Example: --expected-server 10.0.0.1 --expected-server 192.168.1.1 None
--help boolean Show this message and exit. False
check_routeros system.power

Check the total power consumption of a device. This might not be available on all devices

Usage:

check_routeros system.power [OPTIONS]

Options:

Name Type Description Default
--warning text Warning threshold for total power consumption None
--critical text Critical threshold for total power consumption None
--help boolean Show this message and exit. False
check_routeros system.psu

Check the power supply units (PSU)

Usage:

check_routeros system.psu [OPTIONS]

Options:

Name Type Description Default
--value-warning text Set a warning threshold for a value. Example: If psu1-voltage should be in the range of 12-12.1V you can set --value-warning psu1-voltage:12:12.1 Can be specified multiple times None
--value-critical text Set a critical threshold for a value. Example: If psu1-voltage should be in the range of 12-12.1V you can set --value-critical psu1-voltage:12:12.1 Can be specified multiple times None
--no-psu-ok boolean The check will be unknown if not at least one psu stat or value is available. Set this to ignore this. False
--expect-psu text Name of the PSU to expect at least one value or state. Can be specified multiple times. []
--help boolean Show this message and exit. False
check_routeros system.temperature

This command reads the information from /system/health and extracts all values containing the word temperature in its name. Like 'board-temperature', 'board-temperature1', 'cpu-temperature', ...

Be aware that not all devices return the same values.

Usage:

check_routeros system.temperature [OPTIONS]

Options:

Name Type Description Default
--value-warning text Set a warning threshold for a value. Example: If cpu-temperature should be in the range of 40 and 60°C you can set --value-warning cpu-temperature:40:60 If cpu-temperature should not be higher than 50.5°C you can set --value-warning cpu-temperature:50.5 Can be specified multiple times None
--value-critical text Set a critical threshold for a value. Example: If cpu-temperature should be in the range of 40 and 60°C you can set --value-critical cpu-temperature:40:60 If cpu-temperature should not be higher than 50.5°C you can set --value-critical cpu-temperature:50.5 Can be specified multiple times None
--regex boolean Treat values from --value-warning and --value-critical as regex to find all matching values False
--no-temperature-ok boolean The check will be unknown if no temperature is available. Provide this option to ignore this. False
--expect-temperature text Name of the temperature to expect. Can be specified multiple times. Example: board-temperature1 []
--help boolean Show this message and exit. False
check_routeros system.update

Usage:

check_routeros system.update [OPTIONS]

Options:

Name Type Description Default
--channel text Allowed update channel. Repeat to use multiple values. None
--latest-version text Set a version that should at least be installed. Use this if the update server is not available or if you want check with your own update policy. None
--check-for-update boolean Actively check for updates. This will run the command /system/package/update/check-for-updates . If you don't whant to use this feature you have to schedule a task to look for updates. False
--help boolean Show this message and exit. False
check_routeros system.uptime

Get Uptime of a device

Usage:

check_routeros system.uptime [OPTIONS]

Options:

Name Type Description Default
--warning text State WARNING if current uptime is below this threshold None
--critical text State CRITICAL if current uptime is below this threshold None
--help boolean Show this message and exit. False
check_routeros tool.ping

Execute a ping command on the device to check other devices

Usage:

check_routeros tool.ping [OPTIONS]

Options:

Name Type Description Default
--address text Address of device to ping _required
--packet-loss-warning text Warning threshold for packet loss None
--packet-loss-critical text Critical threshold for packet loss None
--ttl-warning text Warning threshold for the Time-To-Live (TTL) value None
--ttl-critical text Critical threshold for the Time-To-Live (TTL) value None
--help boolean Show this message and exit. False