WEBfactory 2010

Using the SNMP Connector

This tutorial will exemplify the creation of a SNMP Connector and the setup of the connector in order to receive data.

We will use the SNMP Connector inside WEBfactoryStudio to connect to the local machine and get the number of running processes, using the OID value obtained from a MIB browser.

Setting up the SNMP Connector in WEBfactoryStudio
  1. In WEBfactory 2010Studio, go to Server List inside the Signal tab. Select the server from the Server List and right click in the right panel to create a New Connector; select SNMP Connector.


    Creating a New Connector in WEBfactoryStudio

    The new connector will be listed in the connectors list. If the Demo Project is installed, the new SNMP Connector should be listed under the WEBfactory .Sim.Da.1 connector. The new SNMP Connector that we just created will be named WEBfactory .SNMP.Connector.

  2. Activate the new SNMP Connector by checking the Active box from the Server View grid.

  3. By default, the Connector Configuration panel will be opened upon creating a new SNMP Connector. To create a machine connection in the SNMP Connector, select New from the Connector Configuration panel.


    Connector Configuration panel

    The new connection will be available in the tree structure, and the connection properties will be displayed in the properties table.


    The new connection and its properties

  4. Enter the target machines IP address (obtained by running the ipconfig command in Command Prompt) in the Address field. For tutorial purposes, enter your machine's own IP.

  5. Enter a prefix in the Prefix field. For this example, enter My as prefix.

  6. Enter the ReadCommunity and the WriteCommunity as configured in the SNMP Service. In our Setting up the SNMP tutorial, the ReadCommunity was set up with the name readonly).

  7. Press Save to save this settings.

    Now the new connection from the SNMP Connector is targeting the local machine.

    Next we will address to a specific data output from the local machine, by using an OID. For tutorial purpose, we will use the OID number, which refers to the number of current running processes.

  8. To create a data output connection, select the machine connection defined earlier and click on the New button from the top bar.


    New device connection

  9. Enter the name of the data output in the Name field. For this example, we will use Processes, as the device in our case is the number of processes.

  10. Enter the OID number in the OID field. This will address to the number of current running processes.

  11. In order to be able to display the data from the targeted data output, select a syntax option from the Syntax menu. In this example, the correct syntax for displaying the number of current running processes is SNMP GAUGE32.

  12. Leave the Writeable check-box unmarked, as the number of processes cannot be written, but only read.

  13. For the Period property, leave the value at 1000 milliseconds.

  14. Click Save to save the current changes.

Setting up the signal for the SNMP Connector

Now the SNMP Connector is configured and connected to a data output. In order to see the actual data output, we need to create a signal for our data output.

In order to create a new signal in the WEBfactory .SNMP.Connector, we need to create first a new signal group in our connector.

  1. Select the connector from the Signal tab > Server List > server and right click in the empty pane from the right side. Select New Group.


    Creating a new Signal Group for the SNMP Connector

  2. Now select the new group Group1 from the Signal tab > Server List > server > WEBfactory .SNMP.Connector and right click in the right panel to create a new signal.


    Creating a new signal

  3. In the Signal Details panel, name the signal as My.Processes.

  4. Set OPC item name to My.Processes too.

  5. Click Save to save the signal settings.

Testing the My.Processes signal and the SNMP Connector

To test the result, start the WEBfactory 2010 Server (or restart it if it was running) and open the WEBfactoryTest Center.

  1. In the Test Center, import the signal by clicking on Browse server from the top bar.

  2. Select Group1 from the WEBfactory .SNMP.Connector and select the My.Processes signal.

  3. Click Import to import it, and Close to close the Browse Server window.


    Browse the server and select to import the desired signal in Test Center

The Test Center should display the right value for the signal. To test the signal against the system, open the Windows Task Manager and check the number of running processes. It will be the same with the one displayed by the My.Processes signal in Test Center.