Traps / Informs

This chapter describes how the WinCC OA SNMP components handle SNMP traps and informs messages and what functionality can be achieved.

A SNMP inform message has the same structure as a trap but requires an acknowledgement by the SNMP manager.

PMON

The PMON can send SNMP traps based on manager state changes. This means that it can send a trap when e.g. a manager crashes. This functionality can be enabled with the config entry sendManagerStateChange = "Yes" in the [pmon] section.

Restriction: SNMP informs messages are not supported by the PMON.

How traps can be triggered:

  • managerUp (oid 1.3.6.1.4.1.13828.2.1.9.1):

    Is triggered when a manager is started.

  • managerDown (oid 1.3.6.1.4.1.13828.2.1.9.2):

    Is triggered when a manager is stopped.

  • configChanged (oid 1.3.6.1.4.1.13828.2.1.9.3):

    Is triggered when the contents of the managerTable have been changed (a manager is added, removed or edited).

  • startupFault (oid 1.3.6.1.4.1.13828.2.1.9.4):

    Is triggered when a stopped manager which should be running is found during the startup of a project.

  • projectStop (oid 1.3.6.1.4.1.13828.2.1.9.5):

    Is triggered as soon as the command to stop the project is received.

With the config entry v1TrapTarget it is possible to configure where the traps are sent, whereas multiple-targets are supported. Since the PMON acts as a proxy for the live agent, the v1TrapTarget settings also apply to traps sent by the live agent. This means that the live agent is also unable to send traps without the PMON.

The PMON must be started with the option v1WriteCommunity = "admin", otherwise the v1TrapTarget settings will not be applied and traps cannot be sent. These settings are saved in temporary MIB files in the /data folder of the project directory. The v1TrapTarget settings remains even if the config entry for the PMON is removed. This means that you have to delete the temporary MIB files to remove the settings.

The information contained inside the traps gives details about the manager type, the manager ID as well as the start up position inside the manager list.

Live Agent

With the live agent you can send traps with user texts. To do so, the live agent data point _<num>_SNMPLiveAgent.SpecificTrap must be set. If a string is written to this data point element, a trap with the written string and a fix OID (1.3.6.1.4.1.13828.2.1.13.0) is sent to the trap target addresses.

Restriction: SNMP informs messages are not supported by the Live Agent.

SNMP Manager

Traps and informs can be received with the SNMP manager. The acknowledgment of the inform occurs automatically and the further processing of an inform is the same as for a trap. This means that from the application's perspective it makes no difference whether a trap or an inform was received.

For SNMP V1/V2 Traps/Informs, the received data is mapped to the internal data point elements under the _<num>_SNMPManager.Trap node.

You can also map the PayloadValue from the traps to data point elements with peripheral addresses. To do this, the following must be present:

  1. A peripheral address with the corresponding Payload OID must be configured.
  2. The peripheral address must have the mode input - spontaneous.
  3. A connection must be configured for the agent that sent the trap (the IP address of the trap source must match the configured IP address of the WinCC OA agent).

The SNMP manager is also able to receive SNMP V3 traps / informs and send traps. In contrast to the V1/V2 agent, receiving only works via configured peripheral addresses, as there must be an associated SNMP V3 connection with the correct security parameters in WinCC OA.

The SNMP manager can send traps via the data point _<num>_SNMPEntity_y.Notify. Then the traps are sent directly to the associated SNMP entity (i.e. to the IP address configured there). The PMON is not required as a proxy for this.

Restriction: Sending traps via output peripheral addresses is not possible.