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 proxy for the live agent, the v1TrapTarget settings also apply for traps that are sent by the live agent. Thus, also the live agent is not able to send traps without 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 it is possible to send traps with user texts. To do so, the live agent data point _<num>_SNMPLiveAgent.SpecificTrap has to 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

With the SNMP manager traps and informs can be received. The acknowledgement of the informs is done automatically and the further processing of an inform is the same as for a trap. This meas that there is no difference from application point of view if a trap or an inform has been received.

The information for the received traps/informs are mapped to the internal data points below the node _<num>_SNMPManager.Trap.

It is also possible to map the PayloadValue from the traps/informs to the data point elements via peripheral addresses. For that the following must apply:

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

The SNMP manager is also able to receive traps/informs but only send SNMP v3 traps. Receiving works as same as for v1/2 traps, though the security parameters for the agent must be set correctly.

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). For this the PMON as proxy is not needed.

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