This article applies as of PRTG 22


I would like to send SNMP traps as notifications, so that my trap receiver can process them. Is this possible?


Documentation of SNMP traps sent by PRTG

PRTG comes with an SNMP Trap Receiver sensor. It can also trigger notifications that are used to send SNMP traps to a computer where a trap receiver is listening. Trap receivers store these messages and/or forward traps to administrators via alerts.


Limitations of SNMP trap notifications

  • PRTG can only send standard SNMP traps. SNMP v3 is currently not supported.


Setup of SNMP trap notifications

To activate an SNMP trap notification in PRTG, navigate to the Settings tab of a notification, enable Send SNMP Trap, and then configure it as follows:

  • Host/IP Address and SNMP Port (usually port 162) of your trap receiver.
  • Community String (usually public if not changed).
  • A Custom Trap Code to identify the purpose of the trap.
  • A value of your choice for the field Message ID. On the trap receiver, this value will enable you to filter messages from PRTG.
  • A string of your choice for the field Message. You can use the standard placeholders of PRTG. They will be substituted during runtime, just like in other notifications.
  • In the field Agent IP you can enter an IP address that is used for sending the trap. If you leave this field empty, the IP address of the PRTG core server system is used.


Contents of SNMP traps sent by PRTG

SNMP traps sent by PRTG always use the SNMP v1 format. The following OIDs will be included in the trap:

  • 1.3.6.1.4.1.32446.1.1.1: MessageID (as defined by the user in the field Message ID)
  • 1.3.6.1.4.1.32446.1.1.2: An integer that represents the event that triggered the notification:
    • 0 = State ended
    • 1 = State started
    • 2 = Volume reached
    • 3 = Speed not reached
    • 4 = Speed reached
    • 5 = Threshold not reached
    • 6 = Threshold reached
    • 7 = Value changed
  • 1.3.6.1.4.1.32446.1.1.3: The state of the object:
    • 0 = None
    • 1 = Unknown
    • 2 = Collecting Data
    • 3 = Up
    • 4 = Warning
    • 5 = Down
    • 6 = No Probe
    • 7 = Paused by User
    • 8 = Paused by Dependency
    • 9 = Paused by Schedule
    • 10 = Unusual
    • 11 = Paused by License
    • 12 = Paused until
    • 13 = Down (Acknowledged)
    • 14 = Down (Partial)
  • 1.3.6.1.4.1.32446.1.1.4: The message text of the notification as defined by the user. If the user has enabled the Send Sensor ID option, the message text will include the sensor ID. You can enable this setting in your notification template setting on PRTG.

To migrate notification configurations in PRTG, note that individual notification settings cannot be exported separately. All configurations, including notifications, are stored in the PRTG `Configuration.dat` file within the PRTG data folder. To transfer these settings, you must copy the PRTG `Configuration.dat` file from the test environment to the production environment. First, stop the PRTG services on both machines, then copy the file to the corresponding location on the target machine, and restart the services. This process ensures that all notification configurations are available on the new machine.


MIB for SNMP trap notifications from PRTG

Read this article for more information about the MIB file:


Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.