Configuration Overview

The Atatus Infra Agent contains a built-in SNMP Trap Receiver. You can enable it under /etc/atatus-infra-agent/conf.d/snmp.d/snmp.yml

Traps do not require polling; devices push events instantly.

SNMP Traps Configuration (YAML Template)

Below is the exact structure following your formatting/spacing/comment style:

copy
icon/buttons/copy
    # SNMP TRAPS CONFIGURATION
    snmp_traps:
      enabled: true

      # Trap Listener Settings
      port: 162                    # Default SNMP trap port
      bind_host: 0.0.0.0           # Listen on all interfaces
      stop_timeout: 10             # Graceful shutdown timeout

      # Namespace (Important!)
      # Used to correlate traps with the correct device
      # Example:
      #   nyc:192.168.1.1  → NYC router traps
      #   paris:192.168.1.1 → Paris router traps
      #
      namespace: atatus-IN

      # Local Storage for Received Traps
      traps_db_path: run/traps_db

      # SNMPv2 Trap Authentication
      community_strings:
        - public
        - private

      # SNMPv3 Trap Users
      users:
        - username: trapuser
          auth_protocol: sha
          auth_key: authpassword123
          priv_protocol: aes
          priv_key: privpassword123

Explanation of Key Fields

Field Description
enabled Enables SNMP trap receiver
port Listening port for traps (default: 162/UDP)
bind_host Interface/IP the trap listener binds to
namespace Ensures traps map to the correct device/site
traps_db_path Local buffer for trap persistence
community_strings Accepted SNMPv2 trap community strings
users Accepted SNMPv3 trap users & security details

Trap Security

SNMPv2 (Community string)

Traps include only a shared community string such as public or private.

SNMPv3 (Secure)

You can specify:

auth_protocol: sha, sha256, etc.

auth_key

priv_protocol: aes, aes256, etc.

priv_key

This ensures authenticated + encrypted traps.

After Configuration

Restart agent:

copy
icon/buttons/copy
sudo systemctl restart atatus-infra-agent

Device namespaces

As with Network Device Monitoring, use namespace tags to differentiate between multiple network devices that share the same private IP. For example, you may have two routers that use the same private IP address—one located in Chennai and another in Singapore. In this case:

The Agent running in the Chennai data center should send telemetry tagged with namespace: chennai

The Agent running in the Singapore data center should send telemetry tagged with namespace: singapore

This namespace ensures that the platform can uniquely correlate:

An SNMP trap to the correct emitting device

A device entry back to the correct SNMP trap source

Important: If you enable namespace tags on any of your Agents, be sure to enable namespace tags on all Agents. Do not configure namespaces for only a subset of Agents.