PermitANY

Cisco NX-OS SNMP & Syslog

Cisco NX-OSBeginner

SNMPv3 and syslog configuration for Cisco Nexus switches, including trap hosts, NTP, and NXOS-specific logging features.

↓ example.txt

What is it?

NX-OS SNMP and syslog configuration follows the same principles as IOS but with important VRF differences. Because NX-OS has a dedicated 'management' VRF, all monitoring traffic (SNMP polls, traps, syslog) must be directed to use 'use-vrf management' — otherwise the switch tries to reach your NMS via the data plane (default VRF) which usually doesn't have a route to management servers. NX-OS also supports 'logging timestamp milliseconds' for precise event correlation in high-speed data center environments.

✓ When to use

  • ·Every production Nexus switch — monitoring is not optional
  • ·Before deploying to production — configure SNMP and syslog as part of day-0 setup
  • ·When integrating with data center monitoring tools (SolarWinds, PRTG, Zabbix, Prometheus)
  • ·For compliance — PCI-DSS, HIPAA, SOC 2 all require centralized logging

✗ When NOT to use

  • ·Never use SNMPv2c with an RW community in production — it allows unauthenticated device reconfiguration

How it compares

vs Cisco IOS SNMP/syslogSame protocols, but NX-OS requires 'use-vrf management' on every monitoring command. NX-OS also uses role-based SNMP groups ('network-admin', 'network-operator') instead of access lists.
vs Streaming telemetry (gRPC)NX-OS 9.2+ supports model-driven telemetry (MDT) that streams real-time metrics to Kafka, InfluxDB, or Grafana. MDT provides higher resolution and lower overhead than SNMP polling. Both are useful: SNMP for compatibility, MDT for real-time dashboards.

Prerequisites

  • NTP must be configured and synchronized (with 'use-vrf management') before enabling syslog
  • NMS server must be reachable via mgmt0 interface (management VRF)
  • SNMPv3 user must be configured on the NMS before the switch will respond to polls
  • Firewall rules: UDP 161 (SNMP polling), UDP 162 (traps), UDP 514 (syslog) from/to management subnet

Config Generator

Verification commands

show snmp

Show SNMP counters and confirm SNMP is active

Expected: Shows input/output packets. If all zeros, SNMP is not receiving requests.

show logging server

Show configured syslog servers and their status

Expected: Shows each server IP, severity level, and VRF. Verify 'use-vrf management' appears.

show ntp status

Verify NTP synchronization — critical for log timestamps

Expected: Clock is synchronized. If unsynchronized, all log timestamps will be wrong.

Debug commands

show snmp user

Show SNMPv3 users and their auth/priv configuration

Common mistakes & fixes

NMS cannot poll the Nexus switch via SNMP

Cause: Missing 'use-vrf management' on SNMP configuration, or NMS unreachable via mgmt0

Fix: Verify the NMS is reachable: 'ping <nms-ip> vrf management'. Check 'show snmp' — if the NMS polls from a different IP than expected, update the SNMP ACL.

Syslog messages not appearing on the server

Cause: Missing 'use-vrf management' on the logging server command

Fix: Check 'show logging server'. Re-add the server with 'logging server <ip> <level> use-vrf management'.

Log timestamps show wrong time or year 1970

Cause: NTP not synchronized, or NTP configured without 'use-vrf management'

Fix: Add NTP: 'ntp server <ip> use-vrf management'. Verify sync: 'show ntp status'.

Related configs