I would like to send SNMP traps as notifications, so that my trap receiver can process them. Is this possible?
This article applies to PRTG Network Monitor 19 or later
Documentation of SNMP Traps Sent by PRTG
Beyond including an SNMP Trap Receiver sensor, PRTG Network Monitor includes the option to trigger notifications that are used to send SNMP traps to a computer where a trap receiver is listening. Trap receivers store these messages for later analysis and/or forward traps to the administrators by using other means of alerting.
Limitations of SNMP Trap Notifications
- PRTG can only send standard SNMP traps. SNMP V3 is not supported in the current implementation.
Setup of SNMP Trap Notifications
To activate an SNMP Trap notification in PRTG, you need to navigate to the Settings tab of a notification, enable Send SNMP Trap, and then supply the following fields:
- Host/IP and SNMP Port (usually port 162) of your trap receiver.
- Community String (usually "public" if not changed).
- A Specific 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 the same as in other notifications.
- In the field Agent IP you can enter an IP address that is used for sending the trap, or you leave this field empty to automatically use the IP address of the computer that is running PRTG.
Contents of SNMP Traps Sent by PRTG
SNMP traps sent by PRTG always use 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 representing 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 Traps Notifications from PRTG
Please see this article for 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.