I would like to send SNMP traps as notifications, so that my trap receiver can process them. Is this possible?
This article applies as of PRTG 22
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:
- 22.214.171.124.4.1.324126.96.36.199: MessageID (as defined by the user in the field Message ID)
- 188.8.131.52.4.1.324184.108.40.206: 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
- 220.127.116.11.4.1.32418.104.22.168: 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)
- 22.214.171.124.4.1.324126.96.36.199: The message text of the notification as defined by the user.
MIB for SNMP trap notifications from PRTG
Read this article for more information about the MIB file:
I've seen that PRTG is currently sending traps using SNMPv1.
Is there a way to have sending it using SNMPv2 ?
Can we open an improvement request maybe?
Only SNMP v1 traps are currently supported. We cannot yet tell if v2 trap support will be available in the future, but we do have it on our options list.
Working with a customer who will be implementing this shortly. Once a notification is configured, what is the process to extract the configuration to apply later. We are building a test environment and will need to migrate configs as we develop them. Is there a knowledge base for commands to use to extract this data or is it simply recorded in a file somewhere that can be migrated?
You can not export single notification configurations. The settings are stored within the PRTG Configuration.dat file, which contains all PRTG related infos. You can copy that file to another machine and then the notifications would be there available as well. You can find that file within you PRTG data folder.
Sounds good, thanks for the note. I'd vote for the post, but I can't yet. :D
Question about the location of the configuration file. We have not implemented the fully licensed version yet. I cannot find any dat file or configuration file with the "demo" version we are using. I'm assuming this is not available for the demo version, only the full?
all files are available in the freeware as well as in the commercial version. Please take a look at where does PRTG store it's data.