Start the SNMP communication

This chapter describes how to start the SNMP communication.

  1. Since the SNMP manager was implemented as a driver, add a SNMP manager to the console via "Append a new manager" (Several SNMP managers with different manager numbers can run simultaneously) .

  2. Add also the live agent (API manager) to the console.

  3. Set the necessary settings in the config file:

[pmon]

SNMPPortNr = 4700 # Specifies the port number of the Pmon agent.

sendManagerStateChange = "Yes" # If a trap should be sent when the status

# of a manager is changed, this parameter should be set to "Yes".

allowSNMP = "Yes" # Set the entry to "Yes". The entry is "No" by default

v1ReadCommunity = "user"

v1WriteCommunity = "admin" # The community has to be the same that was set # for the agent when it was configured

LAProxyPortNr = 4701 # The port number has to be the port number of the

#live agent

v1TrapTarget = "192.168.150.29/162" # Specifies the recipient of the traps

[snmpa]

SNMPPortNr = 4701 # Specifies the port number of the Live agent.

v1ReadCommunity = "public"

v1WriteCommunity = "admin"

enableUserTraps = "Yes" # Enables the sending of traps

PmonPortNr = 4700 # Specifies the port number of the Pmon. This is

#necessary since the Pmon serves as a proxy for the Live Agent.

If you want to query the Pmon and live agents, you have to know the IP address of the computer (on which the agents are running. The IP is specified when configuring the agent). Additionally, you have to know the port numbers e.g. 4700 for the Pmon and 4701 for the Live Agent and the ReadCommunity (e.g. "user" for the Pmon and "public" for the Live agent).

  1. Add an address config to the data points that should represent the queried data (See chapter Definition of the SNMP peripheral address for information on how to add an address config). When adding an address config you choose either an OID of the WinCC OA MIB or an OID of an external MIB.

  2. If you query WinCC OA data points over the SNMP live agent, the changes of these data points are set (shown) on the data points to which an address config was added. If you query values of external SNMP agents, these values are returned.

Note that an appropriate transformation (for information on the data types see Data types and debug levels ) has to be configured for the SNMP data (syntax). If the transformation is not configured, the error message "conversion failed in transformation" is shown. This error message is also shown if data, which cannot be queried, is queried from the MIB.

General query

The SNMP driver executes an automatic general query (GQ) at start-up. This can be switched off using the config entry doGQOnStart.

At a redundancy switch no GQ is executed.

It is also possible to trigger a general query per agent.

  • For SNMP v1 or v2 agents:

    Write the number of the agent to the .GQ DPE of the corresponding driver data point of the type _DriverCommon, e.g.:

     dpSet("Driver_3.GQ", 10);

    This triggers a GQ for the agent with the number 10 if the SNMP driver with the number 10 is running.

  • For v3 agents:

    Write the number of the agent + 10000 to the .GQ DPE of the corresponding driver data point of the type _DriverCommon, e.g.:
     dpSet("Driver_3.GQ", 10010);

    This triggers a GQ for the agent with the number 10 if the SNMP driver with the number 10 is running.