Skip to content

SNMP: Configuration, OID Reference, and Monitoring Integration

SNMP: Configuration, OID Reference, and Monitoring Integration

Section titled “SNMP: Configuration, OID Reference, and Monitoring Integration”

RouterOS supports SNMP versions 1, 2c, and 3. SNMPv1 and SNMPv2c use community strings for access control; SNMPv3 adds per-user authentication and optional encryption, making it suitable for production environments. This guide covers enabling SNMP, configuring all three protocol versions, understanding the MikroTik OID tree, loading custom MIBs, and integrating with common monitoring platforms.

Command paths:

PathPurpose
/snmpGlobal SNMP settings
/snmp communityv1/v2c communities and SNMPv3 users
/snmp targetTrap destinations

SNMP is disabled by default. Enable it and set contact/location metadata:

/snmp set enabled=yes contact="[email protected]" location="DC1-Rack3"

Verify the service is active:

/snmp print

SNMPv2c uses a shared community string with no encryption. Restrict access by source address and disable the default public community in production:

# Restrict the default community to a specific NMS subnet
/snmp community set [find name=public] addresses=10.0.0.0/24 read-access=yes write-access=no
# Or create a dedicated community and disable the default
/snmp community add name=monitoring addresses=10.10.10.50/32 read-access=yes write-access=no
/snmp community set [find name=public] disabled=yes

SNMPv3 replaces community strings with named users that carry their own authentication and privacy credentials.

LevelAuthEncryptionUse Case
noAuthNoPrivNoneNoneTesting/trusted networks only
authNoPrivMD5 or SHANoneAuth without encryption
authPrivMD5 or SHADES or AESRecommended for production
  • MD5 — faster, 128-bit hash; acceptable for legacy environments
  • SHA / SHA1 — stronger, 160-bit hash; preferred
  • AES — recommended; 128-bit block cipher
  • DES — legacy; 56-bit, considered weak
/snmp community add \
name=nmsv3 \
security=private \
authentication-protocol=SHA \
authentication-password="AuthPass123!" \
encryption-protocol=AES \
encryption-password="PrivPass123!" \
addresses=10.10.10.0/24 \
read-access=yes \
write-access=no

Note: Both the authentication password and encryption password must be at least 8 characters.

/snmp community print detail

Traps are unsolicited notifications sent from the router to a monitoring host when events occur.

/snmp set trap-version=2 trap-community=monitoring
# SNMPv2c trap target
/snmp target add address=10.10.10.50:162 version=2 community=monitoring
# SNMPv3 trap target (where supported)
/snmp target add address=10.10.10.50:162 version=3 security-name=nmsv3 security-level=authPriv

Common trap generators:

GeneratorTrigger
temp-exceptionTemperature threshold exceeded
start-trapRouter boot/restart
interfacesInterface state change

Allow SNMP polling and trap traffic only from authorized hosts:

# Allow SNMP polling from NMS host
/ip firewall filter add chain=input protocol=udp dst-port=161 \
src-address=10.10.10.50/32 action=accept comment="SNMP polling"
# Drop all other SNMP
/ip firewall filter add chain=input protocol=udp dst-port=161 \
action=drop comment="Drop unauthorized SNMP"

RouterOS exposes both standard MIB trees and MikroTik enterprise OIDs under the private enterprise branch (1.3.6.1.4.1.14988).

OIDNameDescription
1.3.6.1.2.1.1.1sysDescrSystem description (RouterOS version)
1.3.6.1.2.1.1.2sysObjectIDVendor object identifier
1.3.6.1.2.1.1.3sysUpTimeTime since last restart
1.3.6.1.2.1.1.5sysNameRouter hostname
1.3.6.1.2.1.1.6sysLocationPhysical location
OIDNameDescription
1.3.6.1.2.1.2.2.1.2ifDescrInterface name
1.3.6.1.2.1.2.2.1.3ifTypeInterface type
1.3.6.1.2.1.2.2.1.5ifSpeedInterface speed (bps)
1.3.6.1.2.1.2.2.1.8ifOperStatusOperational status (1=up, 2=down)
1.3.6.1.2.1.2.2.1.10ifInOctetsInbound bytes (32-bit)
1.3.6.1.2.1.2.2.1.16ifOutOctetsOutbound bytes (32-bit)
1.3.6.1.2.1.31.1.1.1.6ifHCInOctetsInbound bytes (64-bit) — use on high-speed links
1.3.6.1.2.1.31.1.1.1.10ifHCOutOctetsOutbound bytes (64-bit) — use on high-speed links

Use 64-bit counters (ifHCInOctets/ifHCOutOctets) for interfaces faster than 100 Mbit/s to avoid counter wrap.

The MikroTik enterprise OID tree is rooted at 1.3.6.1.4.1.14988. The sub-tree below covers the most commonly polled objects.

System resources and health:

OIDMIKROTIK-MIB nameDescription
1.3.6.1.4.1.14988.1.1.1.3mtxrWlStatPer-radio wireless statistics table
1.3.6.1.4.1.14988.1.1.1.3.1.4.XmtxrWlStatTxRateTX rate (bps) for wireless client X
1.3.6.1.4.1.14988.1.1.1.3.1.6.XmtxrWlStatSignalStrengthSignal strength (dBm) for client X
1.3.6.1.4.1.14988.1.1.3.8.0mtxrHlVoltageBoard voltage (units: 0.1 V)
1.3.6.1.4.1.14988.1.1.3.10.0mtxrHlTemperatureBoard temperature (units: 0.1 °C)
1.3.6.1.4.1.14988.1.1.3.11.0mtxrHlProcessorLoadCPU load (%)
1.3.6.1.4.1.14988.1.1.3.12.0mtxrHlMemoryUsageMemory usage (%)
1.3.6.1.4.1.14988.1.1.3.13.0mtxrHlStorageUsageStorage usage (%)

Writable management OIDs:

OIDDescription
1.3.6.1.4.1.14988.1.1.7.1.0Reboot trigger (SET non-zero value to reboot)
1.3.6.1.4.1.14988.1.1.8.1.1.3.XExecute script number X via SNMP SET
1.3.6.1.4.1.14988.1.1.18.1.1.2.XRun script X and return output via GET

PoE-Out (where hardware supports it):

OIDDescription
1.3.6.1.4.1.14988.1.1.15.1.1.3.XPoE-Out port X status
1.3.6.1.4.1.14988.1.1.15.1.1.5.XPoE-Out port X current (mA)
1.3.6.1.4.1.14988.1.1.15.1.1.6.XPoE-Out port X power (mW)

Use /interface print oid, /ip address print oid, etc. to discover OIDs for any RouterOS object dynamically.

Terminal window
# Walk the system group
snmpwalk -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> 1.3.6.1.2.1.1
# Walk interface table (64-bit counters)
snmpwalk -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> 1.3.6.1.2.1.31.1.1.1
# Walk MikroTik enterprise tree
snmpwalk -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> 1.3.6.1.4.1.14988

MikroTik publishes MIB files for import into NMS tools. Place them in your SNMP manager’s MIB directory alongside standard dependencies (SNMPv2-SMI, IF-MIB, HOST-RESOURCES-MIB). RouterOS does not require MIB files to answer OID queries — MIBs are used by the manager for symbolic name resolution.


/snmp set enabled=yes contact="NetOps" location="DC1-RackA"
/snmp community add \
name=librenms-v3 \
security=private \
authentication-protocol=SHA \
authentication-password="AuthPass123!" \
encryption-protocol=AES \
encryption-password="PrivPass123!" \
addresses=10.10.10.50/32 \
read-access=yes

Before adding the device in LibreNMS, confirm SNMP connectivity from the polling server:

Terminal window
snmpwalk -v3 -l authPriv -u librenms-v3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> 1.3.6.1.2.1.1

In the LibreNMS UI, go to Devices → Add Device and set:

FieldValue
Hostname/IPRouter IP address
SNMP Versionv3
Security LevelauthPriv
Usernamelibrenms-v3
Auth AlgorithmSHA
Auth PasswordAuthPass123!
Crypto AlgorithmAES
Crypto PasswordPrivPass123!
Context(leave blank)
Port161

After discovery and initial poll:

  • Traffic graphs — per-interface in/out bps, errors, discards
  • Device overview — uptime, CPU, memory utilization
  • Availability — polling latency and ICMP response

Recommended alerts to enable:

AlertThreshold
Device unreachableAny failure
Interface downOperational interfaces only
High CPU> 80% sustained
High memory> 90% used
Interface errors/discardsSpike above baseline

/snmp set enabled=yes contact="NOC" location="DC1-R1"
/snmp community set [find default=yes] disabled=yes
/snmp community add \
name=zbxv3 \
security=private \
authentication-protocol=SHA \
authentication-password="AuthPass_ChangeMe" \
encryption-protocol=AES \
encryption-password="PrivPass_ChangeMe" \
addresses=10.10.10.10/32 \
read-access=yes

In Configuration → Hosts → Create host, add an SNMP interface:

FieldValue
IP addressRouter IP
Port161
SNMP versionSNMPv3
Security namezbxv3
Security levelauthPriv
Auth protocolSHA
Auth passphraseAuthPass_ChangeMe
Privacy protocolAES
Privacy passphrasePrivPass_ChangeMe

Link the host to a MikroTik SNMP template. Community-maintained templates are available in the Zabbix template library and cover:

  • Interface discovery and traffic monitoring (IF-MIB)
  • CPU and memory utilization
  • System uptime and availability
  • Hardware health sensors (temperature/voltage, device-dependent)
ItemDescription
ifOperStatusInterface up/down state
ifHCInOctets / ifHCOutOctets64-bit traffic counters
ifInErrors / ifOutErrorsInterface error rate
sysUpTimeUptime (alert on unexpected restart)
MikroTik CPU OIDCPU load percentage
MikroTik memory OIDFree/used memory

Recommended triggers:

  • Device unavailable (ICMP and SNMP unreachable)
  • Interface link down on critical interfaces
  • CPU sustained above threshold
  • Memory utilization critical
  • Interface error rate spike
  • Unexpected reboot (uptime reset)

/snmp set enabled=yes contact="[email protected]" location="HQ"
/snmp community add \
name=prtgv3 \
security=private \
authentication-protocol=SHA1 \
authentication-password="AuthPass123" \
encryption-protocol=AES \
encryption-password="PrivPass123" \
addresses=10.10.10.20/32 \
read-access=yes

In PRTG, go to Add Device and set SNMP version to v3. Under the device’s SNMP credentials:

FieldValue
SNMP Version3
Security Nameprtgv3
Security LevelauthPriv
Auth MethodSHA
Auth PasswordAuthPass123
Encryption TypeAES
Encryption PasswordPrivPass123

Useful PRTG sensor types for MikroTik:

Sensor TypePurpose
SNMP TrafficPer-interface bandwidth monitoring
SNMP Custom OIDQuery specific MikroTik enterprise OIDs
SNMP System UptimeMonitor router restarts
PingAvailability and latency

For custom OID sensors targeting MikroTik-specific metrics (CPU, memory, signal strength), use the SNMP Custom OID sensor with the enterprise OIDs listed in the OID Tree Overview section above.


RouterOS does not require MIB files to answer OID queries — it responds to numeric OIDs regardless. MIB files are used by the manager (NMS or CLI tools) to resolve symbolic names and validate the data type and description of each OID. Installing the MikroTik MIB files on your NMS enables human-readable output and auto-discovery of MikroTik-specific metrics.

Download the official MikroTik MIB bundle from:

https://mikrotik.com/download/tools

The archive contains:

  • MIKROTIK-MIB — MikroTik enterprise OIDs (primary file)
  • Standard dependency MIBs if bundled (SNMPv2-SMI, IF-MIB, HOST-RESOURCES-MIB)

Installing MIBs on Linux (snmpwalk/snmpget)

Section titled “Installing MIBs on Linux (snmpwalk/snmpget)”

Place the MIB file in your SNMP manager’s MIB directory and load it:

Terminal window
# Copy to user MIB directory
mkdir -p ~/.snmp/mibs
cp MIKROTIK-MIB ~/.snmp/mibs/
# Or system-wide
sudo cp MIKROTIK-MIB /usr/share/snmp/mibs/
# Verify it loads (should show no errors)
snmptranslate -m +MIKROTIK-MIB -IR mtxrHlTemperature
# Expected output: MIKROTIK-MIB::mtxrHlTemperature.0

Enable the MIB for all snmp commands by adding to ~/.snmp/snmp.conf:

mibs +MIKROTIK-MIB

Then use symbolic names directly:

Terminal window
# Poll temperature using symbolic name
snmpget -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> MIKROTIK-MIB::mtxrHlTemperature.0
# Walk all health OIDs
snmpwalk -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> MIKROTIK-MIB::mtxrHealth

LibreNMS auto-discovers MikroTik devices using its built-in OS definition. To add the MikroTik MIB for custom polling:

Terminal window
# Copy to LibreNMS MIB directory
sudo cp MIKROTIK-MIB /opt/librenms/mibs/
# Validate the MIB loads
sudo -u librenms /opt/librenms/scripts/pre-commit.php --check-mib MIKROTIK-MIB

LibreNMS includes a MikroTik OS definition (includes/definitions/mikrotik.yaml) that maps common enterprise OIDs to graphs automatically upon device discovery. No additional configuration is required for standard CPU, memory, and wireless metrics.

For custom OID polling, use Custom OID under device settings in LibreNMS:

  1. Go to Devices → Device → Edit → Custom OIDs
  2. Add the OID, description, and data type
  3. LibreNMS graphs and alerts can then reference the custom value
Terminal window
# Copy to Zabbix MIB directory
sudo cp MIKROTIK-MIB /usr/share/snmp/mibs/
# Verify Zabbix can resolve the MIB
zabbix_get -s <router-ip> -c monitoring -k "SNMP[MIKROTIK-MIB::mtxrHlTemperature.0]"

In the Zabbix UI, MIBs are referenced when configuring SNMP items:

FieldValue
SNMP OIDMIKROTIK-MIB::mtxrHlTemperature.0
Type of informationNumeric (float)
Units°C (multiply raw value by 0.1 in preprocessing)

Use Preprocessing → Multiplier: 0.1 for health OIDs that report in 0.1 units (voltage, temperature).

If MIB files are unavailable, poll by numeric OID directly:

Terminal window
# Temperature in 0.1 °C units (divide by 10 for Celsius)
snmpget -v2c -c monitoring <router-ip> 1.3.6.1.4.1.14988.1.1.3.10.0
# CPU load percent
snmpget -v2c -c monitoring <router-ip> 1.3.6.1.4.1.14988.1.1.3.11.0
# Walk entire health subtree
snmpwalk -v2c -c monitoring <router-ip> 1.3.6.1.4.1.14988.1.1.3

RouterOS reports OIDs for every item in its configuration. Use print oid in any submenu to discover the exact OID for any object:

# Find OIDs for all interfaces
/interface print oid
# Find OIDs for IP addresses
/ip address print oid
# Find OIDs for BGP peers (if configured)
/routing bgp peer print oid

This is the definitive method to find the exact OID index for a specific interface or configuration item on a given router.


# Check service is enabled
/snmp print
# Confirm firewall allows UDP 161 from NMS
/ip firewall filter print

From the NMS host:

Terminal window
# Quick connectivity test (v2c)
snmpget -v2c -c monitoring <router-ip> 1.3.6.1.2.1.1.5.0
# SNMPv3 test
snmpget -v3 -l authPriv -u nmsv3 \
-a SHA -A 'AuthPass123!' -x AES -X 'PrivPass123!' \
<router-ip> 1.3.6.1.2.1.1.5.0
  • Confirm the username in /snmp community matches exactly what the NMS sends
  • Verify auth and privacy protocols match on both sides (SHA vs SHA1 naming varies by tool)
  • Check passwords meet the 8-character minimum
  • Ensure the NMS source IP is within the addresses restriction on the community
  • Verify the target IP and port (UDP 162) are reachable from the router
  • Check /snmp print for the configured trap community and version
  • Confirm no firewall rule blocks outbound UDP 162