SNMP Support for Applications

We have recently been doing some network management integration for Wowza Streaming Engine and out of this has come this very small module so you can view Application information via SNMP.

It only provides the high level application information but we thought it would be useful to share.

You would need to add a server listener into the ServerListener section in the Server.xml file which would look like this

<ServerListener>
	<BaseClass>guru.thewowza.snmp.SNMPServer</BaseClass>
</ServerListener>

There are then three properties that can be configured. These should be added to the last properties section of the Server.xml

The properties would look something like this

<Properties>
	<Property>
		<Name>theWowzaGuruSNMPIPAddress</Name>
		<Value>192.168.1.54</Value>
		<Type>String</Type>
	</Property>
	<Property>
		<Name>theWowzaGuruSNMPBaseOID</Name>
		<Value>1.3.6.1.4.1.88888</Value>
		<Type>String</Type>
	</Property>
	<Property>
		<Name>theWowzaGuruSNMPCommunity</Name>
		<Value>daverocks</Value>
		<Type>String</Type>
	</Property>
</Properties>

The theWowzaGuruSNMPIPAddress MUST BE set otherwise it defaults to localhost and may make polling your server with SNMP impossible ( depending on where your SNMP client is). The module does not attempt to work out any IP addressing.

The theWowzaGuruSNMPBaseOID allows you to set the base OID of the tree that will be used for the output. It MUST begin in the enterprise space of 1.3.6.1.4.1 otherwise the module will not respond to any SNMP queries

The theWowzaGuruSNMPCommunity sets the community to be used. The default is public but this should be changed for your environment with the use of this property.

When you start your Wowza Streaming Engine server you should see

INFO server comment - TheWowzaGuru SNMP: Using address 192.168.1.54
INFO server comment - TheWowzaGuru SNMP: Using baseOID 1.3.6.1.4.1.88888

You can then walk your server and you should get the following

snmpwalk -v 2c -c daverocks 192.168.1.54 .1
ccitt.1 = No Such Object available on this agent at this OID

If you now connect a client so an application starts and do another walk you will get

snmpwalk -v 2c -c daverocks 192.168.1.54 .1
iso.3.6.1.4.1.88888.1.1.1.1.1 = Counter64: 1442316632592
iso.3.6.1.4.1.88888.1.1.1.2.1 = STRING: "/usr/local/WowzaStreamingEngine/applications/live"
iso.3.6.1.4.1.88888.1.1.1.3.1 = STRING: "/usr/local/WowzaStreamingEngine/conf/live/Application.xml"
iso.3.6.1.4.1.88888.1.1.1.4.1 = STRING: "Tue, Sep 15 2015 11:30:32 +0000"
iso.3.6.1.4.1.88888.1.1.1.5.1 = Counter64: 3261
iso.3.6.1.4.1.88888.1.1.1.6.1 = Counter64: 4
iso.3.6.1.4.1.88888.1.1.1.7.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.1.8.1 = Counter64: 3413
iso.3.6.1.4.1.88888.1.1.1.9.1 = Counter64: 3
iso.3.6.1.4.1.88888.1.1.1.10.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.1.11.1 = STRING: "live"
iso.3.6.1.4.1.88888.1.1.1.12.1 = STRING: "3 seconds 590 milliseconds"
iso.3.6.1.4.1.88888.1.1.2.1.1 = Counter64: 1442316632593
iso.3.6.1.4.1.88888.1.1.2.2.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.2.3.1 = Counter64: 1442316632807
iso.3.6.1.4.1.88888.1.1.2.4.1 = STRING: "3 seconds 365 milliseconds"
iso.3.6.1.4.1.88888.1.1.2.5.1 = STRING: "Tue, Sep 15 2015 11:30:32 +0000"
iso.3.6.1.4.1.88888.1.1.2.6.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.2.7.1 = STRING: "never"
iso.3.6.1.4.1.88888.1.1.2.8.1 = STRING: "never"
iso.3.6.1.4.1.88888.1.1.2.9.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.2.10.1 = STRING: "never"
iso.3.6.1.4.1.88888.1.1.2.11.1 = STRING: "never"
iso.3.6.1.4.1.88888.1.1.2.12.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.2.13.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.2.14.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.3.1.1 = Counter64: 1442316632594
iso.3.6.1.4.1.88888.1.1.3.2.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.3.3.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.3.4.1 = Counter64: 3261
iso.3.6.1.4.1.88888.1.1.3.5.1 = Counter64: 4
iso.3.6.1.4.1.88888.1.1.3.6.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.3.7.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.3.8.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.3.9.1 = Counter64: 0
iso.3.6.1.4.1.88888.1.1.3.10.1 = Counter64: 3413
iso.3.6.1.4.1.88888.1.1.3.11.1 = Counter64: 3
iso.3.6.1.4.1.88888.1.1.3.12.1 = Counter64: 1
iso.3.6.1.4.1.88888.1.1.3.13.1 = Counter64: 5
iso.3.6.1.4.1.88888.1.1.3.14.1 = Counter64: 2
iso.3.6.1.4.1.88888.1.1.3.15.1 = Counter64: 4

The OID break down is

1.3.6.1.4.1.88888.1.x.

The x is the application instance number and increases each time an application starts. Even if the same application stops and restarts this number increases to show a new SNMP object set.

In the example above the application OID is

1.3.6.1.4.1.88888.1.1

The next OID is 1 , 2 or 3

1 breaks down as follows

The output breaks down as follows in comparison to the Java API

1 – ObjectInstanceTime – SNMP Object creation time
2 – getApplicationPath
3 – getConfigPath
4 – getDateStarted
5 – getMessagesInBytes
6 – getMessagesInCount
7 – getMessagesInCountRate
8 – getMessagesOutBytes
9 – getMessagesOutCount
10 – getMessagesOutCountRate
11 – getName
12 – getTimeRunning

2 breaks down as follows

1 – ObjectInstanceTime – SNMP Object creation time
2 – getCurrent
3 – getLastConnectAcceptedStamp
4 – getLastConnectAcceptedStampString
5 – getLastConnectAcceptedTimeString
6 – getLastConnectRejectedStamp
7 – getLastConnectRejectedStampString
8 – getLastConnectRejectedTimeString
9 – getLastDisconnectStamp
10 – getLastDisconnectStampString
11 – getLastDisconnectTimeString
12 – getTotal
13 – getTotalAccepted
14 – getTotalRejected

3 breaks down as follows

1 – ObjectInstanceTime – SNMP Object creation time
2 – getFileInBytes
3 – getFileOutBytes
4 – getMessagesInBytes
5 – getMessagesInCount
6 – getMessagesInCountRate
7 – getMessagesLossBytes
8 – getMessagesLossCount
9 – getMessagesLossCountRate
10 – getMessagesOutBytes
11 – getMessagesOutCount
12 – getMessagesOutCountRate
13 – incrementMessagesIn
14 – incrementMessagesLoss
15 – incrementMessagesOut

Download the module and source codeĀ here.


Comments are closed.