Configure custom SNMP MIBs for vendor-specific monitoring with SNMP v2c and v3

Intermediate 45 min May 26, 2026 78 views
Ubuntu 24.04 Debian 12 AlmaLinux 9 Rocky Linux 9

Learn to install and configure custom vendor MIB files for specialized network device monitoring using both SNMP v2c and v3 protocols with authentication and encryption.

Prerequisites

  • Root or sudo access
  • Network connectivity to monitored devices
  • Vendor MIB files from device manufacturers

What this solves

Standard SNMP monitoring only covers generic metrics like interface statistics and system information. Vendor-specific MIBs unlock detailed monitoring of specialized hardware features like power supply status, temperature sensors, RAID arrays, and custom application metrics. This tutorial shows you how to install vendor MIB files and configure both SNMP v2c and v3 monitoring with proper authentication and encryption.

Step-by-step installation

Install SNMP daemon and utilities

Install the SNMP daemon, client utilities, and MIB browser tools needed for vendor-specific monitoring.

sudo apt update
sudo apt install -y snmp snmpd snmp-mibs-downloader libsnmp-dev
sudo download-mibs
sudo dnf install -y net-snmp net-snmp-utils net-snmp-devel
sudo dnf install -y epel-release
sudo dnf install -y net-snmp-perl

Configure MIB search paths

Set up the directory structure and configure where SNMP tools look for MIB files.

sudo mkdir -p /usr/share/snmp/mibs/vendor
sudo mkdir -p /etc/snmp/mibs
# Configure MIB search paths
mibs +ALL
mibdirs /usr/share/snmp/mibs:/usr/share/snmp/mibs/vendor:/etc/snmp/mibs

Disable MIB warnings for unknown objects

dontLogTCPWrappersConnects yes logTimestamp yes

Download and install vendor MIB files

Download MIB files from your vendor's support site and install them properly. This example shows Cisco and Dell MIBs.

# Create vendor-specific directories
sudo mkdir -p /usr/share/snmp/mibs/vendor/cisco
sudo mkdir -p /usr/share/snmp/mibs/vendor/dell
sudo mkdir -p /usr/share/snmp/mibs/vendor/hp
# Download example Cisco MIBs (replace URLs with actual vendor links)
cd /tmp
wget https://www.cisco.com/c/dam/en/us/td/docs/ios-xml/ios/snmp/mibs/all-mibs.zip
unzip all-mibs.zip
sudo cp *.my /usr/share/snmp/mibs/vendor/cisco/

Set proper permissions

sudo chown root:root /usr/share/snmp/mibs/vendor/cisco/* sudo chmod 644 /usr/share/snmp/mibs/vendor/cisco/*

Configure SNMP v2c community strings

Set up community-based authentication for SNMP v2c monitoring with read-only and read-write access.

# SNMP v2c community configuration

Read-only community for monitoring

rocommunity monitoring_readonly default rocommunity6 monitoring_readonly default

Read-write community for configuration (use sparingly)

rwcommunity config_readwrite localhost

System information

sysLocation "Data Center A, Rack 23" sysContact "network-admin@example.com" sysName "network-switch-01"

Agent address and port

agentAddress udp:161,udp6:[::1]:161

Disable default public community

rocommunity public default

Disk and load monitoring

disk / 10000 load 12 14 14

Process monitoring

proc sshd proc snmpd

Configure SNMP v3 users and authentication

Create SNMP v3 users with authentication and privacy encryption for secure monitoring.

# Stop snmpd to modify v3 configuration
sudo systemctl stop snmpd
# Add SNMP v3 configuration to existing file

SNMP v3 User configuration

Auth protocol: MD5 or SHA

Privacy protocol: DES or AES

Read-only user with authentication only

createUser monitor_user MD5 "StrongAuthPassword123!" rouser monitor_user

Read-write user with authentication and privacy

createUser admin_user SHA "StrongAuthPassword456!" AES "StrongPrivPassword789!" rwuser admin_user

Read-only user with both auth and privacy

createUser secure_monitor SHA "MonitorAuthPass321!" AES "MonitorPrivPass654!" rouser secure_monitor

Security model configuration

com2sec notConfigUser default public com2sec configUser localhost config_readwrite com2sec readUser default monitoring_readonly group notConfigGroup v1 notConfigUser group notConfigGroup v2c notConfigUser group configGroup v2c configUser group readGroup v2c readUser view systemonly included .1.3.6.1.2.1.1 view systemonly included .1.3.6.1.2.1.25.1 access notConfigGroup "" any noauth exact systemonly none none access configGroup "" any noauth exact all all none access readGroup "" any noauth exact all none none

Configure vendor-specific OID monitoring templates

Create monitoring templates for common vendor-specific metrics using their custom MIBs.

# Cisco device monitoring OIDs

CPU utilization (5-minute average)

ciscoMemoryPoolUsed .1.3.6.1.4.1.9.9.48.1.1.1.5 ciscoCPUTotal5min .1.3.6.1.4.1.9.9.109.1.1.1.1.8

Interface specific metrics

ciscoInterfaceAlias .1.3.6.1.4.1.9.9.46.1.3.1.1.18 ciscoInterfaceDescription .1.3.6.1.4.1.9.9.46.1.6.1.1.14

Dell PowerEdge server monitoring

Temperature sensors

dellTemperatureProbeReading .1.3.6.1.4.1.674.10892.1.700.20.1.6 dellTemperatureProbeStatus .1.3.6.1.4.1.674.10892.1.700.20.1.5

Power supply status

dellPowerSupplyStatus .1.3.6.1.4.1.674.10892.1.600.12.1.5 dellPowerSupplyType .1.3.6.1.4.1.674.10892.1.600.12.1.7

Fan status

dellFanStatus .1.3.6.1.4.1.674.10892.1.700.12.1.5 dellFanSpeed .1.3.6.1.4.1.674.10892.1.700.12.1.6

RAID controller status

dellVirtualDiskStatus .1.3.6.1.4.1.674.10892.1.1100.20.1.4 dellPhysicalDiskStatus .1.3.6.1.4.1.674.10892.1.1100.25.1.4

Create monitoring scripts for custom metrics

Develop scripts to query vendor-specific OIDs and format the output for monitoring systems.

#!/bin/bash

SNMP vendor monitoring script

Usage: ./snmp-vendor-monitor.sh

TARGET_IP="$1" COMMUNITY="$2" VERSION="$3" if [ $# -ne 3 ]; then echo "Usage: $0 " echo "Version: 2c or 3" exit 1 fi check_cisco_metrics() { echo "=== Cisco Device Metrics ===" # CPU utilization CPU=$(snmpget -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.4.1.9.9.109.1.1.1.1.8.1 2>/dev/null | cut -d' ' -f4) echo "CPU 5min avg: ${CPU}%" # Memory utilization MEM_USED=$(snmpget -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.4.1.9.9.48.1.1.1.5.1 2>/dev/null | cut -d' ' -f4) MEM_TOTAL=$(snmpget -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.4.1.9.9.48.1.1.1.6.1 2>/dev/null | cut -d' ' -f4) if [ -n "$MEM_USED" ] && [ -n "$MEM_TOTAL" ]; then MEM_PERCENT=$((MEM_USED * 100 / MEM_TOTAL)) echo "Memory usage: ${MEM_PERCENT}% (${MEM_USED}/${MEM_TOTAL})" fi } check_dell_metrics() { echo "=== Dell PowerEdge Metrics ===" # Temperature sensors snmpwalk -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.4.1.674.10892.1.700.20.1.6 2>/dev/null | while read line; do TEMP=$(echo $line | cut -d' ' -f4) SENSOR=$(echo $line | cut -d'.' -f2) echo "Temperature sensor ${SENSOR}: ${TEMP}°C" done # Power supply status snmpwalk -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.4.1.674.10892.1.600.12.1.5 2>/dev/null | while read line; do STATUS=$(echo $line | cut -d' ' -f4) PSU=$(echo $line | cut -d'.' -f2) case $STATUS in 1) STATUS_TEXT="Other" ;; 2) STATUS_TEXT="Unknown" ;; 3) STATUS_TEXT="OK" ;; 4) STATUS_TEXT="Non-critical" ;; 5) STATUS_TEXT="Critical" ;; 6) STATUS_TEXT="Non-recoverable" ;; *) STATUS_TEXT="Unknown($STATUS)" ;; esac echo "Power Supply ${PSU}: ${STATUS_TEXT}" done }

Determine device type and check appropriate metrics

SYS_OID=$(snmpget -v${VERSION} -c${COMMUNITY} ${TARGET_IP} .1.3.6.1.2.1.1.2.0 2>/dev/null | cut -d' ' -f4) case $SYS_OID in .1.3.6.1.4.1.9.) check_cisco_metrics ;; .1.3.6.1.4.1.674.) check_dell_metrics ;; *) echo "Unknown or unsupported device type: $SYS_OID" ;; esac
sudo chmod +x /usr/local/bin/snmp-vendor-monitor.sh

Configure SNMP v3 authentication script

Create a script for SNMP v3 monitoring with authentication and privacy.

#!/bin/bash

SNMP v3 monitoring script with authentication and privacy

Usage: ./snmp-v3-monitor.sh

TARGET_IP="$1" USERNAME="$2" AUTH_PASS="$3" PRIV_PASS="$4" if [ $# -ne 4 ]; then echo "Usage: $0 " exit 1 fi

SNMP v3 with SHA authentication and AES privacy

SNMP_OPTS="-v3 -l authPriv -u ${USERNAME} -a SHA -A ${AUTH_PASS} -x AES -X ${PRIV_PASS}" echo "=== SNMP v3 Device Monitor ===" echo "Target: $TARGET_IP" echo "User: $USERNAME" echo ""

System information

echo "System Information:" SYS_NAME=$(snmpget $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.1.5.0 2>/dev/null | cut -d'"' -f2) SYS_DESCR=$(snmpget $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.1.1.0 2>/dev/null | cut -d'"' -f2) UPTIME=$(snmpget $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.1.3.0 2>/dev/null | cut -d')' -f1 | cut -d'(' -f2) echo " Name: $SYS_NAME" echo " Description: $SYS_DESCR" echo " Uptime: $UPTIME" echo ""

Interface statistics

echo "Interface Statistics:" snmpwalk $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.2.2.1.2 2>/dev/null | head -5 | while read line; do INTERFACE=$(echo $line | cut -d'"' -f2) INDEX=$(echo $line | cut -d'.' -f2 | cut -d' ' -f1) # Get interface statistics IN_BYTES=$(snmpget $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.2.2.1.10.${INDEX} 2>/dev/null | awk '{print $NF}') OUT_BYTES=$(snmpget $SNMP_OPTS ${TARGET_IP} .1.3.6.1.2.1.2.2.1.16.${INDEX} 2>/dev/null | awk '{print $NF}') echo " ${INTERFACE}: IN=${IN_BYTES} bytes, OUT=${OUT_BYTES} bytes" done
sudo chmod +x /usr/local/bin/snmp-v3-monitor.sh

Start and enable SNMP daemon

Enable the SNMP daemon to start automatically and begin accepting monitoring requests.

sudo systemctl enable --now snmpd
sudo systemctl status snmpd

Configure firewall rules

Open the SNMP port for monitoring while restricting access to trusted networks only.

# Allow SNMP from monitoring network only
sudo ufw allow from 192.168.1.0/24 to any port 161
sudo ufw allow from 203.0.113.0/24 to any port 161
sudo ufw reload
# Allow SNMP from monitoring network only
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port protocol="udp" port="161" accept'
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.0/24" port protocol="udp" port="161" accept'
sudo firewall-cmd --reload
Security Note: Never open SNMP port 161 to the entire internet. Always restrict access to trusted monitoring networks and use SNMP v3 with encryption for sensitive environments.

Verify your setup

Test both SNMP v2c and v3 configurations to ensure vendor-specific monitoring is working correctly.

# Test SNMP v2c community access
snmpget -v2c -c monitoring_readonly localhost .1.3.6.1.2.1.1.1.0
snmpwalk -v2c -c monitoring_readonly localhost .1.3.6.1.2.1.1
# Test SNMP v3 authentication
snmpget -v3 -l authNoPriv -u monitor_user -a MD5 -A "StrongAuthPassword123!" localhost .1.3.6.1.2.1.1.1.0
# Test SNMP v3 with privacy encryption
snmpget -v3 -l authPriv -u secure_monitor -a SHA -A "MonitorAuthPass321!" -x AES -X "MonitorPrivPass654!" localhost .1.3.6.1.2.1.1.1.0
# Test vendor-specific monitoring scripts
/usr/local/bin/snmp-vendor-monitor.sh localhost monitoring_readonly 2c
/usr/local/bin/snmp-v3-monitor.sh localhost secure_monitor "MonitorAuthPass321!" "MonitorPrivPass654!"
# Check MIB loading and vendor OID resolution
snmptranslate -Td .1.3.6.1.4.1.9.9.109.1.1.1.1.8
snmpwalk -v2c -c monitoring_readonly localhost .1.3.6.1.4.1.9 | head -5

Integration with monitoring systems

Prometheus SNMP Exporter configuration

Configure the SNMP exporter to use your custom MIBs and vendor-specific OIDs. You can reference our Prometheus monitoring setup guide for the complete monitoring stack.

# SNMP Exporter configuration for vendor devices
global:
  scrape_timeout: 10s

modules:
  cisco_device:
    walk:
      - 1.3.6.1.2.1.1  # System information
      - 1.3.6.1.4.1.9.9.109.1.1.1.1.8  # CPU utilization
      - 1.3.6.1.4.1.9.9.48.1.1.1  # Memory pools
      - 1.3.6.1.2.1.2.2.1  # Interface statistics
    version: 3
    auth:
      username: secure_monitor
      password: MonitorAuthPass321!
      auth_protocol: SHA
      priv_protocol: AES
      priv_password: MonitorPrivPass654!
      security_level: authPriv
  
  dell_server:
    walk:
      - 1.3.6.1.2.1.1  # System information
      - 1.3.6.1.4.1.674.10892.1.700.20.1  # Temperature sensors
      - 1.3.6.1.4.1.674.10892.1.600.12.1  # Power supplies
      - 1.3.6.1.4.1.674.10892.1.700.12.1  # Fans
      - 1.3.6.1.4.1.674.10892.1.1100.20.1  # Virtual disks
    version: 2c
    community: monitoring_readonly

Create monitoring alerts

Set up alerting rules for vendor-specific metrics. This integrates well with Prometheus AlertManager for comprehensive notification handling.

groups:
  - name: cisco_alerts
    rules:
      - alert: CiscoCPUHigh
        expr: snmp_cisco_cpu_5min > 80
        for: 5m
        labels:
          severity: warning
          device_type: cisco
        annotations:
          summary: "Cisco device CPU utilization high"
          description: "CPU utilization is {{ $value }}% on device {{ $labels.instance }}"
      
      - alert: CiscoMemoryHigh
        expr: (snmp_cisco_memory_used / snmp_cisco_memory_total) * 100 > 85
        for: 5m
        labels:
          severity: critical
          device_type: cisco
        annotations:
          summary: "Cisco device memory utilization critical"
          description: "Memory utilization is {{ $value }}% on device {{ $labels.instance }}"
  
  - name: dell_alerts
    rules:
      - alert: DellTemperatureHigh
        expr: snmp_dell_temperature > 70
        for: 3m
        labels:
          severity: warning
          device_type: dell
        annotations:
          summary: "Dell server temperature high"
          description: "Temperature sensor reading {{ $value }}°C on server {{ $labels.instance }}"
      
      - alert: DellPowerSupplyFailure
        expr: snmp_dell_power_supply_status != 3
        for: 0m
        labels:
          severity: critical
          device_type: dell
        annotations:
          summary: "Dell server power supply failure"
          description: "Power supply status is {{ $value }} (not OK) on server {{ $labels.instance }}"

Common issues

SymptomCauseFix
MIB file not found errors Incorrect MIB path configuration Check mibdirs setting in /etc/snmp/snmp.conf and verify file permissions
SNMP v3 authentication failures Password length or special characters Ensure passwords are at least 8 characters, escape special chars in shell scripts
OID returns "No Such Object" Device doesn't support that MIB Use snmpwalk -v2c -c community device .1.3.6.1.4.1.vendor to discover supported OIDs
Timeout errors from devices Network connectivity or community strings Test with snmpget and verify firewall rules on both client and device
Permission denied on MIB files Incorrect file ownership Use sudo chown root:root /usr/share/snmp/mibs/vendor/* and sudo chmod 644
SNMP daemon won't start Configuration syntax errors Check sudo snmpd -f -Lo for configuration validation errors

Next steps

Running this in production?

Need enterprise-grade monitoring? Setting up custom SNMP monitoring is straightforward. Keeping hundreds of devices monitored, MIBs updated, and alerts tuned across environments is the harder part. See how we run infrastructure like this for European teams.

Automated install script

Run this to automate the entire setup

Need help?

Don't want to manage this yourself?

We handle managed devops services for businesses that depend on uptime. From initial setup to ongoing operations.