How to use SNMP in Wowza Streaming Engine

Simple Network Management Protocol (SNMP) is a network management protocol that you can use to collect information about your Wowza Streaming Engine media server configuration. It's especially useful for large media server networks without a large staff to monitor every computer. SNMP, which is widely used in local area networks (LANs), lets you monitor the media servers on your network from a management host. You can use third-party SNMP management software to monitor any media server that has SNMP agent software installed. The SNMP agent interacts with the SNMP management software to enable sharing of status information between monitored media servers and the SNMP management system that monitors them. This article describes how to configure and use the SNMP version 2c (SNMPv2c) functionality in Wowza Streaming Engine media server software.

Notes:
  • This article assumes that you've set up an SNMP-managed network and have functional knowledge of its use.
     
  • SNMPv2c capability is supported in Wowza Streaming Engine™ 4.5.0 or later. It enables you to monitor status for different media server SNMP objects but not configure those objects.

Contents


Configuration
Properties
Confirming SNMP functionality (snmpwalk)
About the Wowza Streaming Engine SNMP object hierarchy

Configuration


To turn on the SNMP capability in Wowza Streaming Engine, you must add the SNMPServer server listener to your media server configuration. You can do this either in Wowza Streaming Engine Manager or by editing the Server.xml configuration file manually:

Wowza Streaming Engine Manager configuration

  1. In Wowza Streaming Engine Manager, click the Server tab and then click Server Setup in the contents panel.
     
  2. On the details page, click the Server Listeners tab.
     
    Note: Access to the Server Listeners tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. Click Edit, and then click the Add Server Listener button.
     
  4. In the Add Server Listener dialog box, in Base Class, enter com.wowza.wms.snmp.server.SNMPServer, and then click Add.
     
  5. Click Save and then restart Wowza Streaming Engine.

Server.xml configuration 

  1. Open the Wowza Streaming Engine Server.xml configuration file ([install-dir]/conf/Server.xml) in a text editor, and then add the following server listener to the <ServerListeners> container.
    <ServerListener>
    	<BaseClass>com.wowza.wms.snmp.server.SNMPServer</BaseClass>
    </ServerListener>
  2. Save and close the Server.xml file, and then restart Wowza Streaming Engine.
After restarting Wowza Streaming Engine, you should see the following in the Wowza Streaming Engine access log ([install-dir]/logs/wowzastreamingengine_access.log):
SNMP Agent: Started

Properties


After enabling the server listener, you can adjust the default SNMP deployment parameters by adding properties to your server.
 
  1. In Wowza Streaming Engine Manager, click the Server tab, and then click Server Setup.
     
  2. In the Server Setup page, click the Properties tab and then click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add.
     
    Path
    Name
    Type
    Value
    Notes
    /Root/Server snmpCommunity String public The SNMP community string. You should change the default value (public) for your media server that's deployed in a production environment.
    /Root/Server snmpIPAddress String 192.168.1.10 The IPv4 IP address on which the service will respond. The default setting is to respond on all available host IP addresses. (Note: IPv6 addressing is not supported.)
    /Root/Server snmpPort String 161 The UDP port used by the SNMP service. The default is port 161 (the default SNMP port).
    /Root/Server snmpObjectList String server,vhost,application,appinstance The set of SNMP objects that can be monitored, specified in a comma-separated list. Wowza Streaming Engine enables the SNMP service to access server, VHost, application, application instance, stream, and client information through corresponding SNMP object names (server,vhost,application,appinstance,stream,client). You can configure any combination of the available objects; however, the stream and client objects will add load to the server. Be sure that your media server can handle the additional resource requirements if you add either of these objects to the comma-separated list. The default value is server,vhost,application,appinstance.
  5. Click Save and then restart the Wowza media server.

Confirming SNMP functionality (snmpwalk)


To test the SNMP capability in Wowza Streaming Engine software, do the following:
 
  1. Download the Wowza Streaming Engine management information base (MIB) file in a compressed (zipped) folder (Download WowzaStreamingEngineMIB.zip).
     
  2. Extract the MIB file and then copy it to the directory used by your SNMP tools.
     
  3. Use the following snmpwalk command example to verify the functionality. This example polls the media server for the available SNMP objects:
     
    snmpwalk -v 2c -c [snmpCommunity] [snmpIPAddress] .1
    For example:
    snmpwalk -v 2c -c public 192.168.1.10 .1
    The output, if no clients are connected to the media server, might look similar to the following:
    WOWZA-STREAMING-ENGINE-MIB::serverCounterCreationTime.1 = Counter64: 1458655349313
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetAdminGUID.1 = STRING: 53082e51-1c5b-4222-81ad-15bffb0ca3f2
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetClientIdGeneratorRecycleDelaySize.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetClientIdGeneratorRecycleSize.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetClientIdGeneratorTimeout.1 = Counter64: 600000
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCommittedVirtuallMemory.1 = Counter64: 225574912
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetConnectionsMaximum.1 = Counter64: 18446744073709551615
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCoreHandlerPoolSize.1 = INTEGER: 120
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCoreTransportPoolSize.1 = INTEGER: 80
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCryptoPoolActiveCount.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCryptoPoolMaxSize.1 = INTEGER: 100
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetCurrentHeapSize.1 = Counter64: 113349168
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetDateStarted.1 = STRING: Tue, Mar 22 2016 14:02:26 +0000
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetDefaultStreamPrefix.1 = STRING: mp4
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetGUID.1 = STRING: 307ec00c-75c5-4c2d-89bb-ece159468d55
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetHTTPHeaderServer.1 = STRING: WowzaStreamingEngine/9.9.9.99
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetLiveStreamTranscoderSessionCount.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetLiveThreads.1 = Counter64: 68
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetMaxHeapSize.1 = Counter64: 715849728
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetPeakThreads.1 = Counter64: 68
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetPublishersMaximum.1 = Counter64: 18446744073709551615
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetRTMPTHeaderServer.1 = STRING: FlashCom/3.5.7
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetServerGUID.1 = STRING: 307ec00c-75c5-4c2d-89bb-ece159468d55
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetSessionGUID.1 = STRING: c8e04841-5324-436d-aa46-9fc99fd93b5a
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetTimeRunning.1 = STRING: 22 seconds 145 milliseconds
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetTranscoderLicenseInUse.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetTranscoderLicenseTotal.1 = Counter64: 18446744073709551615
    WOWZA-STREAMING-ENGINE-MIB::serverCounterGetVersion.1 = STRING: Wowza Streaming Engine 4 Monthly Edition 9.9.9.99 build12056
    WOWZA-STREAMING-ENGINE-MIB::serverConnectCreationTime.1 = Counter64: 1458655349319
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetCurrent.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectAcceptedStamp.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectAcceptedStampString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectAcceptedTimeString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectRejectedStamp.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectRejectedStampString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastConnectRejectedTimeString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastDisconnectStamp.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastDisconnectStampString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetLastDisconnectTimeString.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetTotal.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetTotalAccepted.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverConnectGetTotalRejected.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformCreationTime.1 = Counter64: 1458655349321
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetFileInBytes.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetFileOutBytes.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesInBytes.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesInCount.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesInCountRate.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesLossBytes.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesLossCount.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesLossCountRate.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesOutBytes.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesOutCount.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::serverPerformGetMessagesOutCountRate.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterCreationTime.1.1 = Counter64: 1458655353003
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetApplicationTimeout.1.1 = INTEGER: 60000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetByteArrayOutputStreamBaseClassPath.1.1 = STRING: com.wowza.util.FasterByteArrayOutputStream
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetClientCount.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetClientIdleFrequency.1.1 = INTEGER: 250
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetClientTimeout.1.1 = INTEGER: 90000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetConnectionLimit.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetCoreHandlerPoolSize.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetCoreTransportPoolSize.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetDateStarted.1.1 = STRING: Tue, Mar 22 2016 14:02:32 +0000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetFileIOPoolSize.1.1 = INTEGER: 20
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetHTTPStreamerMaxPathLen.1.1 = INTEGER: 2048
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetHomePath.1.1 = STRING: C:/WowzaGitTree/wse/wms/../install
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetIdleCheckFrequency.1.1 = INTEGER: 50
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetIdleMinimumWaitTime.1.1 = INTEGER: 5
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetIdleWorkerCount.1.1 = INTEGER: 4
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetKeepAliveTimeout.1.1 = INTEGER: 2000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetLiveStreamTranscoderSessionCount.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetMaximumPendingReadBytes.1.1 = INTEGER: 524288
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetMaximumPendingWriteBytes.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetMaximumSetBufferTime.1.1 = INTEGER: 60000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetName.1.1 = STRING: _defaultVHost_
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetNetConnectionIdleFrequency.1.1 = INTEGER: 250
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetNetConnectionProcessorCount.1.1 = INTEGER: 6
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetNextMediaCasterId.1.1 = INTEGER: 101
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetNextNetConnectionId.1.1 = INTEGER: 101
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetPingTimeout.1.1 = INTEGER: 12000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetRTPIdleFrequency.1.1 = INTEGER: 75
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetRTSPMaxPathLen.1.1 = INTEGER: 2048
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledReadMaxSessionBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledWriteBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledWriteMaxSessionBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledWriteMaxSessionClientId.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledWriteRequests.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetScheduledWriteSessions.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetStartupStreamsDelayTime.1.1 = INTEGER: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetTimeRunning.1.1 = STRING: 16 seconds 128 milliseconds
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetUnidentifiedSessionTimeout.1.1 = INTEGER: 30000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetValidationFrequency.1.1 = INTEGER: 20000
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetWaitingReadBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostCounterGetWebRTCIdleFrequency.1.1 = INTEGER: 25
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectCreationTime.1.1 = Counter64: 1458655353006
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetCurrent.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectAcceptedStamp.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectAcceptedStampString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectAcceptedTimeString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectRejectedStamp.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectRejectedStampString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastConnectRejectedTimeString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastDisconnectStamp.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastDisconnectStampString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetLastDisconnectTimeString.1.1 = STRING: never
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetTotal.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetTotalAccepted.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostConnectGetTotalRejected.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformCreationTime.1.1 = Counter64: 1458655353007
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetFileInBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetFileOutBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesInBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesInCount.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesInCountRate.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesLossBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesLossCount.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesLossCountRate.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesOutBytes.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesOutCount.1.1 = Counter64: 0
    WOWZA-STREAMING-ENGINE-MIB::vhostPerformGetMessagesOutCountRate.1.1 = Counter64: 0
    The output example doesn't show application and application instance information because no clients are connected to the media server. This information would be shown in the output if a client connects to the server, which causes an the application and application instance to start automatically. 
Note: Wowza Streaming Engine updates the SNMP objects every 10 seconds. If you use the snmpwalk command to poll the media server more frequently than this, you may get identical poll results in the output.

About the Wowza Streaming Engine SNMP object hierarchy


All the SNMP objects available to monitor in Wowza Streaming Engine are described in the management information base (MIB) and have the following hierarchical octet index:

Octet SNMP Object
First Server - instance number
Second VHost - instance number
Third Application - instance number
Fourth Application instance - instance number
Fifth Stream/Client - instance number

Typically, there's only one server instance running so only .1 is returned as the first octet number after the variable in the SNMP output when you poll the media server. If multiple instances of the same object types are running, each object instance is "indexed" with sequential numbers in their octet position after the variable in the output. For example, an octet number sequence of .1.2.1.1 would appear after an application instance variable running on VHost instance 2 (two VHost instances running on the server).

When an object is either created or destroyed in SNMP, its instance number is incremented. For example, an application would start with the instance number 1, and after it's stopped and restarted, it would have the instance number 2.

The following shows an example of returned application instance information, where one server/VHost/application (.1.1.1) instance is running two application instances (.1.1.1.1) and 3 (.1.1.1.3). In this case, application instance 2 (.1.1.1.2) is stopped.
WOWZA-STREAMING-ENGINE-MIB::applicationInstanceCounterGetName.1.1.1.1 = STRING: mine
WOWZA-STREAMING-ENGINE-MIB::applicationInstanceCounterGetName.1.1.1.3 = STRING: _definst_
.

Originally Published: For Wowza Streaming Engine 4.5.0 on 06-23-2016.
 

If you're having problems or want to discuss this article, post in our forum.