---
title: "What's the difference between SNMP traps and SOMA API polling?"
description: SNMP traps provide real-time push notifications for critical events (<1s latency), while SOMA API polling delivers periodic pull metrics (5-min intervals) for trend analysis, complementing each other for comprehensive DataPower monitoring.
---

# What's the difference between SNMP traps and SOMA API polling?

IBM DataPower Gateway monitoring uses **two complementary methods**: SNMP traps (push model) for real-time events + SOMA API polling (pull model) for periodic metrics. Understanding when to use each method optimizes monitoring effectiveness.

## SNMP Traps (Push Model - Real-time Events)

### How SNMP Traps Work

1. **Event occurs on DataPower appliance** (certificate expires, user fails login 5×, service stops, config changed)
2. **DataPower sends SNMP trap immediately** via UDP port 162 to Nodinite Agent
3. **Agent receives trap** (<1 second latency from event to notification)
4. **Agent parses trap OID** (Object Identifier) to determine event type
5. **Agent evaluates thresholds** and fires alerts if conditions met

### SNMP Trap Use Cases

**Real-time security events:**

* Failed SSH login attempts (potential brute-force attack, immediate investigation)
* Unauthorized configuration changes (admin modified firewall rules, audit trail required)
* Certificate private key access (security audit event, compliance logging)

**Certificate expiration warnings:**

* Certificate expiring in 90 days (proactive renewal planning)
* Certificate expiring in 30 days (urgent renewal required)
* Certificate expiring in 7 days (critical, service outage imminent)

**Service state changes:**

* Service crashed unexpectedly (OpState changed from "up" to "down", immediate alert)
* Service manually disabled (OpState changed to "stopped", investigate if intentional)
* Service stuck in "starting" state (possible configuration error, backend unavailable)

### SNMP Trap Advantages

* **Near real-time latency** - <1 second from event occurrence to trap received by Nodinite Agent
* **Low network overhead** - Traps sent only when events occur (not continuous polling)
* **Immediate critical alerts** - Security events, service crashes detected instantly

### SNMP Trap Limitations

* **Firewall rules required** - DataPower must send outbound UDP to Agent port 162 (some DMZ environments restrict UDP)
* **UDP protocol unreliability** - Traps can be lost if network congestion (no delivery guarantee, no retransmission)
* **No historical trend data** - Traps are point-in-time events (cannot analyze CPU utilization over 30 days)

## SOMA API Periodic Polling (Pull Model)

### How SOMA API Polling Works

1. **Agent initiates HTTPS connection** to DataPower appliance port 5550 (SOMA XML Management Interface)
2. **Agent sends XML request** every 5 minutes (configurable): "Get CPU load, memory usage, disk space, service status"
3. **DataPower responds with XML** containing current metrics
4. **Agent parses XML response** and stores metrics in Nodinite [Log Database][Log Databases]
5. **Agent evaluates thresholds** and fires alerts if conditions met

### SOMA API Polling Use Cases

**Trend analysis for capacity planning:**

* CPU utilization over 30 days (identify peak usage patterns, justify hardware upgrades)
* Memory usage over 90 days (detect gradual memory leaks before crashes)
* Disk space growth over 180 days (plan log archival, storage expansion)

**Gradual degradation detection:**

* Disk space filling 2%/day over 30 days (proactive log rotation before disk full)
* Memory growing 50 MB/day (memory leak detection, XSLT code review required)
* CPU baseline increasing from 45% → 65% over 6 months (capacity planning for business growth)

**Service health monitoring:**

* Multi-Protocol Gateway service status every 5 minutes (OpState: up/down/stopped/starting)
* Backend connection pool health (active connections, wait time, timeout errors)
* Transaction rate monitoring (transactions/second, identify throughput bottlenecks)

### SOMA API Polling Advantages

* **Reliable delivery** - HTTPS TCP protocol with retries on failure (guaranteed metric collection)
* **Historical trend data** - 5-minute polling = 288 datapoints/day for CPU/memory/disk trends
* **No SNMP trap configuration required** - Works with default DataPower SOMA API (no notification rules needed)

### SOMA API Polling Limitations

* **Higher network overhead** - Continuous polling every 5 minutes even if no issues (vs SNMP traps sent only on events)
* **Latency up to 5 minutes** - Worst case: service crashes 1 second after poll, detected 5 minutes later at next poll
* **Cannot detect instant events** - Security events require immediate notification (SNMP traps better for real-time alerts)

## Comparison Table

|Feature|SNMP Traps (Push)|SOMA API Polling (Pull)|  
|---|---|---|  
|:fa-stopwatch: **Latency**|<1 second (real-time)|Up to 5 minutes (periodic)|  
|:fa-network-wired: **Network overhead**|Low (only when events occur)|Higher (continuous every 5 min)|  
|:fa-check-double: **Reliability**|Medium (UDP, can be lost)|High (TCP with retries)|  
|:fa-bullseye: **Use cases**|Critical alerts, security events|Trend analysis, capacity planning|  
|:fa-chart-line: **Historical data**|❌ No (point-in-time events)|✅ Yes (288 datapoints/day)|  
|:fa-shield-halved: **Firewall requirements**|Inbound UDP to the Agent ([firewall settings][Prerequisites firewall])|Outbound HTTPS from the Agent ([firewall settings][Prerequisites firewall])|  
|:fa-sliders: **Configuration complexity**|Medium (notification rules required)|Low (SOMA API enabled by default)|  

## Best Practice: Use Both Together

Combine SNMP traps + SOMA API polling for comprehensive monitoring.

### Configuration Example: Production DataPower Appliance

**SNMP Traps for immediate alerts:**

* **Certificate expiring** (<90 days) → Email operations team (proactive renewal)
* **Service crashed** (OpState: down) → PagerDuty page on-call engineer (immediate investigation)
* **Failed login attempts** (5× in 10 minutes) → Slack #security-alerts (potential brute-force attack)
* **Configuration changed** → Email compliance team (audit trail for SOX/PCI DSS)

**SOMA API Polling for trend analysis:**

* **CPU utilization** (every 5 minutes) → [Monitor View][Monitor Views] "DataPower CPU Trends - 30 Days" (capacity planning)
* **Memory usage** (every 5 minutes) → Monitor View "DataPower Memory Trends - 7 Days" (memory leak detection)
* **Disk space** (every 5 minutes) → Monitor View "DataPower Disk Space - 90 Days" (log rotation planning)
* **Service status** (every 5 minutes) → Monitor View "DataPower Services - Production MPG" (uptime SLA tracking)

### Alert Routing by Urgency

**Critical alerts (SNMP traps):**

* Service down → PagerDuty page (immediate escalation)
* Certificate expiring <7 days → PagerDuty page (service outage risk)

**Warning alerts (SNMP traps + SOMA polling):**

* Certificate expiring 30-90 days → Email operations team (plan renewal)
* CPU >85% sustained 30 minutes → Email IT manager (capacity planning)

**Informational alerts (SOMA polling only):**

* CPU >75% brief spike (5-minute poll) → Slack #datapower-alerts (informational, no action required)
* Memory growing 10%/week → Weekly report to IT management (long-term trend)

## :fa-hand-point-right: Next Steps

To optimize your DataPower monitoring with both SNMP traps and SOMA API polling, follow these steps:

1. **Enable SNMP Traps on DataPower** - Configure DataPower notification rules to send SNMP traps for critical events (certificate expiration, failed logins, service state changes) to Nodinite Agent UDP port 162.

2. **Configure SOMA API Polling** - Set up HTTPS polling (port 5550) from Nodinite Agent to DataPower, with 5-minute intervals for CPU, memory, disk, and service status metrics.

3. **Create Trend Analysis Views** - Build Monitor Views for 7-day, 30-day, and 90-day trending of CPU/memory/disk to identify gradual degradation and capacity planning needs.

4. **Set Appropriate Alert Thresholds** - Configure critical alerts (SNMP) for immediate events and warning alerts (SOMA) for sustained threshold breaches (CPU >85% for 30 minutes).

5. **Integrate with On-Call Systems** - Route SNMP trap alerts to PagerDuty for immediate escalation, and SOMA polling alerts to email/Slack for informational trending.

## :fa-link-horizontal: Related Topics

* [Prerequisites for DataPower Monitoring Agent][Prerequisites] - [Firewall settings][Prerequisites firewall] for SNMP, SNMP traps, and the SOMA API  
* [DataPower Monitoring Configuration][Monitoring] - Configure SNMP notification rules + SOMA API polling resources  
* [Alert Routing and Integrations][Alerts] - Route SNMP trap alerts to PagerDuty, SOMA polling alerts to Slack/email  

[Alerts]:{ndr}/Logging%20and%20Monitoring/IBM%20DataPower%20Gateway/Getting%20started/1.%20Prerequisites.md
[Log Databases]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Overview.md
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring]:{ndr}/Logging%20and%20Monitoring/IBM%20DataPower%20Gateway/Getting%20started/1.%20Prerequisites.md
[Prerequisites]:{ndr}/Logging%20and%20Monitoring/IBM%20DataPower%20Gateway/Getting%20started/1.%20Prerequisites.md
[Prerequisites firewall]:{ndr}/Logging%20and%20Monitoring/IBM%20DataPower%20Gateway/Getting%20started/1.%20Prerequisites.md#fa-shield-check-firewall