SNMP vs Syslog vs NetFlow: What Each Tells You in Monitoring
Running a network means monitoring the state of devices and traffic, noticing problems early and investigating their causes. SNMP, syslog and NetFlow all collect information from devices, but they tell you different things. With SNMP, a managing system (the manager) queries devices (agents) for values such as interface traffic and CPU usage, which tells you "how much". With syslog, devices send events such as links going down, logins and configuration changes as text messages to a logging server, which tells you "what happened when". NetFlow (and IPFIX, the standard based on it) summarizes traffic per group of packets that share the same source, destination and so on (a flow) and exports the summaries, which tells you "who talked to whom, and how much". In practice, all three are used together.
| Aspect | SNMP | syslog | NetFlow (IPFIX) |
|---|---|---|---|
| What it tells you | Device state and quantities: interface traffic and error counts, CPU and memory usage, link status | Events: links going down, successful and failed logins, configuration changes, errors | A breakdown of traffic: which source and destination pairs, using which protocol and ports, sent how much |
| How data is collected | The manager queries at a fixed interval (polling); devices can also report problems with notifications (traps) | The device sends a message to the server when an event happens | The device aggregates flows and exports them to a collecting server (collector) when a flow ends or at fixed intervals |
| Data format | Values defined in MIBs (counters and states), addressed by object identifiers (OIDs) | Severity (0 to 7), source type (facility), timestamp and a text message | Per-flow records: addresses, port numbers, protocol, packet and byte counts, start and end times and more; the fields are defined by templates |
| Time granularity | An average over each polling interval (for example 5 minutes) | Per event, arriving almost immediately | Per flow; long-lived flows are cut into pieces and exported at fixed intervals |
| What it cannot tell you | Whose traffic it is | Traffic volume | Packet contents (data); nor device values such as CPU usage |
| Load on devices and links | Small | Small, though messages can surge during a failure | Larger; on fast links, sampling that examines only some of the packets is sometimes used |
| Standards and port numbers | SNMPv3 is RFC 3411 to 3418; UDP port 161 (queries) and 162 (traps) | RFC 5424; UDP port 514, or 6514 when using TLS | NetFlow v9 is described in RFC 3954 (an informational RFC); the standardized IPFIX is RFC 7011, port 4739 |
| Security | In v1 and v2c, the community string travels unencrypted; v3 adds authentication and encryption | Over UDP there is neither encryption nor delivery confirmation; TLS can protect it | NetFlow v9 has no built-in protection; IPFIX can be protected with TLS or DTLS |
| Main uses | Traffic graphs, tracking link utilization, detecting device failures | Investigating the causes of failures, recording who did what, security monitoring (collected into a SIEM) | Finding hosts and applications that use a lot of bandwidth, detecting unusual traffic, planning link upgrades |
Figures are typical orders of magnitude and vary by process generation and product.