# Realtime monitoring using JMX and MRTG

**URL:** <https://community.wowza.com/t/realtime-monitoring-using-jmx-and-mrtg/35368>\
**Category:** Wowza Streaming Engine\
**Created:** [January 11, 2013, 11:40am UTC](https://community.wowza.com/t/realtime-monitoring-using-jmx-and-mrtg/35368 "2013-01-11T11:40:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azril\_Nazli\_Alias](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@Azril\_Nazli\_Alias](https://community.wowza.com/u/Azril_Nazli_Alias)\
**Post date:** [January 11, 2013, 11:40am UTC](https://community.wowza.com/t/realtime-monitoring-using-jmx-and-mrtg/35368/1 "2013-01-11T11:40:32Z")

</div>

So using an examples from here ( [Scripts to monitor Wowza connections from MRTG and Munin](http://community.wowza.com/t/-/34065) ), I managed to get the graph from MRTG and it is working perfectly

The output :

The settings

==========

Instance : EC2 m1.large

OS : Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-virtual i686)

Wowza version : 3.5.x

Java :

java version “1.6.0\_24”

OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)

OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)

Wowza : Enable JMX access at port 8085 and edit these files

/usr/local/WowzaMediaServer/conf/jmxremote.access

/usr/local/WowzaMediaServer/conf/jmxremote.password

on my setting, username is “admin” and password is “admin”

Next is to compile java program that can access the data via JMX interface and return some numbers

I create a file in /home/ubuntu/scripts/JMXCommandLine.java

[PHP]import java.util.\*;

import javax.management.\*;

import javax.management.remote.\*;

public class JMXCommandLine

{

public static final String STREAMINGTYPES\_TOTAL = “total”;

public static final String STREAMINGTYPES\_CUPERTINO = “cupertino”;

public static final String STREAMINGTYPES\_SMOOTH = “smooth”;

public static final String STREAMINGTYPES\_RTMP = “rtmp”;

public static final String STREAMINGTYPES\_RTSP = “rtsp”;

public static final String[][] countStrs = {

{“Connections”, STREAMINGTYPES\_TOTAL},

{“ConnectionsHTTPCupertino”, STREAMINGTYPES\_CUPERTINO},

{“ConnectionsHTTPSmooth”, STREAMINGTYPES\_SMOOTH},

{“ConnectionsRTMP”, STREAMINGTYPES\_RTMP},

{“ConnectionsRTP”, STREAMINGTYPES\_RTSP},

};

public static final String[][] ioStrs = {

{“IOPerformance”, STREAMINGTYPES\_TOTAL},

{“IOPerformanceHTTPCupertino”, STREAMINGTYPES\_CUPERTINO},

{“IOPerformanceHTTPSmooth”, STREAMINGTYPES\_SMOOTH},

{“IOPerformanceRTMP”, STREAMINGTYPES\_RTMP},

{“IOPerformanceRTP”, STREAMINGTYPES\_RTSP},

};

public static final int SESSIONPROTOCOL\_SMOOTHSTREAMING = 0;

public static final int SESSIONPROTOCOL\_CUPERTINOSTREAMING = 1;

public static final String MBEANNAME = “WowzaMediaServerPro”;

public static final String CMD\_GETSERVERVERSION = “getServerVersion”;

public static final String CMD\_STARTVHOST = “startVHost”;

public static final String CMD\_STOPVHOST = “stopVHost”;

public static final String CMD\_RELOADVHOSTCONFIG = “reloadVHostConfig”;

public static final String CMD\_STARTAPPINSTANCE = “startAppInstance”;

public static final String CMD\_TOUCHAPPINSTANCE = “touchAppInstance”;

public static final String CMD\_SHUTDOWNAPPINSTANCE = “shutdownAppInstance”;

public static final String CMD\_STARTMEDIACASTERSTREAM = “startMediaCasterStream”;

public static final String CMD\_STOPMEDIACASTERSTREAM = “stopMediaCasterStream”;

public static final String CMD\_RESETMEDIACASTERSTREAM = “resetMediaCasterStream”;

public static final String CMD\_GETCONNECTIONCOUNTS = “getConnectionCounts”;

public static final String CMD\_GETIOOUTBYTERATE = “getIOOutByteRate”;

public static final String CMD\_GETIOINBYTERATE = “getIOInByteRate”;

public static final String DEFAULT\_VHOST = “_defaultVHost_”;

public static final String DEFAULT\_APPLICATION = “_defapp_”;

public static final String DEFAULT\_APPINSTANCE = “_definst_”;

public static class AppConextName

{

String vhostName = null;

String appName = null;

String appInstName = null;

public AppConextName()

{

}

public AppConextName(String fullname, boolean startWithDefaults)

{

if (startWithDefaults)

{

vhostName = DEFAULT\_VHOST;

appName = DEFAULT\_APPLICATION;

appInstName = DEFAULT\_APPINSTANCE;

}

int qloc = fullname.indexOf(":");

if (qloc \>= 0)

{

vhostName = fullname.substring(0, qloc);

fullname = fullname.substring(qloc+1);

}

else

vhostName = DEFAULT\_VHOST;

if (fullname.length() \> 0)

{

appName = fullname;

int sloc = fullname.indexOf("/");

if (sloc \>= 0)

{

appName = fullname.substring(0, sloc);

appInstName = fullname.substring(sloc+1);

}

}

}

String getObjName()

{

String ret = “”;

while(true)

{

if (vhostName == null)

break;

ret += “vHosts=VHosts,vHostName=”+vhostName;

if (appName == null)

break;

ret += “,applications=Applications,applicationName=”+appName;

if (appInstName == null)

break;

ret += “,applicationInstances=ApplicationInstances,applicationInstanceName=”+appInstName;

break;

}

return ret;

}

}

public static void printUsage()

{

System.out.println("");

System.out.println(“Usage:”);

System.out.println("");

System.out.println("[command] -[switch [value]…] [command] [params…]");

System.out.println("");

System.out.println(“Switches:”);

System.out.println("");

System.out.println(" -jmx [jmx-url]");

System.out.println(" -user [jmx-username]");

System.out.println(" -pass [jmx-password]");

System.out.println("");

System.out.println(“Commands:”);

System.out.println("");

System.out.println(" "+CMD\_GETSERVERVERSION);

System.out.println(" “+CMD\_STARTVHOST+” [vhost]");

System.out.println(" “+CMD\_STOPVHOST+” [vhost]");

System.out.println(" “+CMD\_RELOADVHOSTCONFIG+”");

System.out.println(" “+CMD\_STARTAPPINSTANCE+” [vhost:application/appInstance]");

System.out.println(" “+CMD\_TOUCHAPPINSTANCE+” [vhost:application/appInstance]");

System.out.println(" “+CMD\_SHUTDOWNAPPINSTANCE+” [vhost:application/appInstance]");

System.out.println(" “+CMD\_STARTMEDIACASTERSTREAM+” [vhost:application/appInstance] [stream-name] [mediacaster-type]");

System.out.println(" “+CMD\_STOPMEDIACASTERSTREAM+” [vhost:application/appInstance] [stream-name]");

System.out.println(" “+CMD\_RESETMEDIACASTERSTREAM+” [vhost:application/appInstance] [stream-name]");

System.out.println(" "+CMD\_GETCONNECTIONCOUNTS);

System.out.println(" “+CMD\_GETCONNECTIONCOUNTS+” [vhost:application/appInstance]");

System.out.println(" “+CMD\_GETCONNECTIONCOUNTS+” [vhost:application/appInstance] [stream-name]");

System.out.println(" "+CMD\_GETIOOUTBYTERATE);

System.out.println(" “+CMD\_GETIOOUTBYTERATE+” [vhost:application/appInstance]");

System.out.println(" "+CMD\_GETIOINBYTERATE);

System.out.println(" “+CMD\_GETIOINBYTERATE+” [vhost:application/appInstance]");

System.out.println("");

}

public static long objToLong(Object valueObj)

{

long ret = 0;

if (valueObj != null)

{

try

{

ret = Long.parseLong(valueObj.toString());

}

catch(Exception e)

{

}

}

return ret;

}

public static Object doInvoke(MBeanServerConnection connection, ObjectName connectsObjName, String cmdStr, Object[] arguments, String[] signature)

{

Object returnObj = null;

try

{

returnObj = connection.invoke(connectsObjName, cmdStr, arguments, signature);

}

catch(Exception e)

{

System.out.println("ERROR: doInvoke: "+e.toString());

}

return returnObj;

}

public static Object doGetAttribute(MBeanServerConnection connection, ObjectName connectsObjName, String attributeName)

{

Object returnObj = null;

try

{

returnObj = connection.getAttribute(connectsObjName, attributeName);

}

catch(Exception e)

{

}

return returnObj;

}

public static void main(String[] args)

{

try

{

for(int i=0;i\<args.length;i++)

args _= args\*.trim();\*_

_String host = “localhost”;_

_String username = null;_

_String password = null;_

_String jmxURL = “service:jmx:rmi://”+host+":8084/jndi/rmi://"+host+":8085/jmxrmi";_

_int argOffset = 0;_

_while(true)_

_{_

_if (argOffset \>= args.length)_

_break;_

_if (!args[argOffset].startsWith("-"))_

_break;_

_if (args[argOffset].startsWith("-host"))_

_{_

_argOffset++;_

_host = args[argOffset];_

_jmxURL = “service:jmx:rmi://”+host+":8084/jndi/rmi://"+host+":8085/jmxrmi";_

_}_

_else if (args[argOffset].startsWith("-jmx"))_

_{_

_argOffset++;_

_jmxURL = args[argOffset];_

_}_

_else if (args[argOffset].startsWith("-user"))_

_{_

_argOffset++;_

_username = args[argOffset];_

_}_

_else if (args[argOffset].startsWith("-pass"))_

_{_

_argOffset++;_

_password = args[argOffset];_

_}_

_argOffset++;_

_}_

_if (argOffset \>= args.length)_

_{_

_printUsage();_

_return;_

_}_

_// create a connection URL_

_JMXServiceURL serviceURL = new JMXServiceURL(jmxURL);_

_// create a environment hash with username and password_

_Map\<String, Object\> env = new HashMap\<String, Object\>();_

_if (username != null && password != null)_

_{_

_String[] creds = {username, password};_

_env.put(JMXConnector.CREDENTIALS, creds);_

_}_

_JMXConnector connector = JMXConnectorFactory.connect(serviceURL, env);_

_MBeanServerConnection connection = connector.getMBeanServerConnection();_

_if (connection == null)_

_{_

_System.out.println("ERROR: Cannot connect to JMX interface: "+jmxURL);_

_return;_

_}_

_if (args[argOffset].equalsIgnoreCase(CMD\_GETSERVERVERSION))_

_{_

_String connectsName = MBEANNAME+":name=Server";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object attrObj = doGetAttribute(connection, connectsObjName, “version”);_

_if (attrObj != null)_

_System.out.println(attrObj);_

_else_

_System.out.println(“unknown”);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_STARTVHOST))_

_{_

_String connectsName = MBEANNAME+":name=Server";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_System.out.println(args[argOffset]+" "+args[argOffset+1]);_

_Object[] arguments = {args[argOffset+1]};_

_String[] signature = {“java.lang.String”};_

_doInvoke(connection, connectsObjName, “startVHost”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_STOPVHOST))_

_{_

_String connectsName = MBEANNAME+":name=Server";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_System.out.println(args[argOffset]+" "+args[argOffset+1]);_

_Object[] arguments = {args[argOffset+1]};_

_String[] signature = {“java.lang.String”};_

_doInvoke(connection, connectsObjName, “stopVHost”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_RELOADVHOSTCONFIG))_

_{_

_String connectsName = MBEANNAME+":name=Server";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_System.out.println(args[argOffset]);_

_Object[] arguments = {};_

_String[] signature = {};_

_doInvoke(connection, connectsObjName, “reloadVHostConfig”, null, null);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_STARTAPPINSTANCE))_

_{_

_System.out.println(args[argOffset]+" "+args[argOffset+1]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",name=VHost";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {context.appName, context.appInstName};_

_String[] signature = {“java.lang.String”, “java.lang.String”};_

_doInvoke(connection, connectsObjName, “startApplicationInstance”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_TOUCHAPPINSTANCE))_

_{_

_System.out.println(args[argOffset]+" "+args[argOffset+1]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",name=VHost";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {context.appName, context.appInstName};_

_String[] signature = {“java.lang.String”, “java.lang.String”};_

_doInvoke(connection, connectsObjName, “touchApplicationInstance”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_SHUTDOWNAPPINSTANCE))_

_{_

_System.out.println(args[argOffset]+" "+args[argOffset+1]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",applications=Applications,applicationName="+context.appName+",name=Application";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {context.appInstName};_

_String[] signature = {“java.lang.String”};_

_doInvoke(connection, connectsObjName, “shutdownAppInstance”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_STARTMEDIACASTERSTREAM))_

_{_

_System.out.println(args[argOffset]+" “+args[argOffset+1]+” “+args[argOffset+2]+” "+args[argOffset+3]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",applications=Applications,applicationName="+context.appName+",applicationInstances=ApplicationInstances,applicationInstanceName="+context.appInstName+",name=ApplicationInstance";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {args[argOffset+2], args[argOffset+3]};_

_String[] signature = {“java.lang.String”, “java.lang.String”};_

_doInvoke(connection, connectsObjName, “startMediaCasterStream”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_STOPMEDIACASTERSTREAM))_

_{_

_System.out.println(args[argOffset]+" “+args[argOffset+1]+” "+args[argOffset+2]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",applications=Applications,applicationName="+context.appName+",applicationInstances=ApplicationInstances,applicationInstanceName="+context.appInstName+",name=ApplicationInstance";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {args[argOffset+2]};_

_String[] signature = {“java.lang.String”};_

_doInvoke(connection, connectsObjName, “stopMediaCasterStream”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_RESETMEDIACASTERSTREAM))_

_{_

_System.out.println(args[argOffset]+" “+args[argOffset+1]+” "+args[argOffset+2]);_

_AppConextName context = new AppConextName(args[argOffset+1], true);_

_String connectsName = MBEANNAME+":vHosts=VHosts,vHostName="+context.vhostName+",applications=Applications,applicationName="+context.appName+",applicationInstances=ApplicationInstances,applicationInstanceName="+context.appInstName+",name=ApplicationInstance";_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object[] arguments = {args[argOffset+2]};_

_String[] signature = {“java.lang.String”};_

_doInvoke(connection, connectsObjName, “resetMediaCasterStream”, arguments, signature);_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_GETCONNECTIONCOUNTS))_

_{_

_StringBuffer outputBuf = new StringBuffer();_

_String streamNamesStr = null;_

_AppConextName context = null;_

_if (args.length \> (argOffset+2))_

_{_

_context = new AppConextName(args[argOffset+1], true);_

_streamNamesStr = args[argOffset+2];_

_}_

_else if (args.length \> (argOffset+1))_

_context = new AppConextName(args[argOffset+1], false);_

_else_

_context = new AppConextName();_

_if (streamNamesStr != null)_

_{_

_String[] streamNames = streamNamesStr.split("[|]");_

_String contextStr = context.getObjName();_

_if (contextStr.length() \> 0)_

_contextStr += “,”;_

_String connectsName = MBEANNAME+":"+contextStr+“name=ApplicationInstance”;_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_long total = 0;_

_long cupertinoTotal = 0;_

_long smoothTotal = 0;_

_long rtspTotal = 0;_

_long rtmpTotal = 0;_

_for(int i=0;i\<streamNames.length;i++)_

_{_

_String streamName = streamNames\*.trim();\*_

_{_

_Object[] arguments = {SESSIONPROTOCOL\_CUPERTINOSTREAMING, streamName};_

_String[] signature = {“int”, “java.lang.String”};_

_Object attrObj = doInvoke(connection, connectsObjName, “getHTTPStreamerSessionCount”, arguments, signature);_

_cupertinoTotal += objToLong(attrObj);_

_}_

_{_

_Object[] arguments = {SESSIONPROTOCOL\_SMOOTHSTREAMING, streamName};_

_String[] signature = {“int”, “java.lang.String”};_

_Object attrObj = doInvoke(connection, connectsObjName, “getHTTPStreamerSessionCount”, arguments, signature);_

_smoothTotal += objToLong(attrObj);_

_}_

_{_

_Object[] arguments = {streamName};_

_String[] signature = {“java.lang.String”};_

_Object attrObj = doInvoke(connection, connectsObjName, “getPlayStreamCount”, arguments, signature);_

_rtmpTotal += objToLong(attrObj);_

_}_

_{_

_Object[] arguments = {streamName};_

_String[] signature = {“java.lang.String”};_

_Object attrObj = doInvoke(connection, connectsObjName, “getRTPSessionCount”, arguments, signature);_

_rtspTotal += objToLong(attrObj);_

_}_

_}_

_total = cupertinoTotal+smoothTotal+rtmpTotal+rtspTotal;_

_System.out.println(STREAMINGTYPES\_TOTAL+":"+total+" “+STREAMINGTYPES\_CUPERTINO+”:"+cupertinoTotal+" “+STREAMINGTYPES\_SMOOTH+”:"+smoothTotal+" “+STREAMINGTYPES\_RTMP+”:"+rtmpTotal+" “+STREAMINGTYPES\_RTSP+”:"+rtspTotal);_

_}_

_else_

_{_

_for(int i=0;i\<countStrs.length;i++)_

_{_

_String contextStr = context.getObjName();_

_if (contextStr.length() \> 0)_

_contextStr += “,”;_

_String connectsName = MBEANNAME+":"+contextStr+“name=”+countStrs\*[0];\*_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object attrObj = doGetAttribute(connection, connectsObjName, “current”);_

_String valueStr = attrObj==null?“0”:attrObj.toString();_

_if (outputBuf.length() \> 0)_

_outputBuf.append(" ");_

_outputBuf.append(countStrs\*[1]+":"+valueStr);\*_

_}_

_}_

_System.out.println(outputBuf.toString());_

_}_

_else if (args[argOffset].equalsIgnoreCase(CMD\_GETIOOUTBYTERATE) ||_

_args[argOffset].equalsIgnoreCase(CMD\_GETIOINBYTERATE))_

_{_

_StringBuffer outputBuf = new StringBuffer();_

_AppConextName context = null;_

_if (args.length \> (argOffset+1))_

_context = new AppConextName(args[argOffset+1], false);_

_else_

_context = new AppConextName();_

_String attrValue = args[argOffset].equalsIgnoreCase(CMD\_GETIOOUTBYTERATE)?“messagesOutBytesRate”:“messagesInBytesRate”;_

_for(int i=0;i\<ioStrs.length;i++)_

_{_

_String contextStr = context.getObjName();_

_if (contextStr.length() \> 0)_

_contextStr += “,”;_

_String connectsName = MBEANNAME+":"+contextStr+“name=”+ioStrs\*[0];\*_

_ObjectName connectsObjName = new ObjectName(connectsName);_

_Object attrObj = doGetAttribute(connection, connectsObjName, attrValue);_

_String valueStr = attrObj==null?“0”:attrObj.toString();_

_if (outputBuf.length() \> 0)_

_outputBuf.append(" ");_

_outputBuf.append(countStrs\*[1]+":"+valueStr);\*_

_}_

_System.out.println(outputBuf.toString());_

_}_

_else_

_System.out.println("ERROR: Command not recognized: "+args[argOffset]);_

_}_

_catch (Exception e)_

_{_

_System.out.println("ERROR: "+e.toString());_

_}_

_}_

_}_[/PHP]

Compile it : [PHP]javac JMXCommandLine.java[/PHP]

And after that, a bunch of files will be generated :

JMXCommandLine$AppConextName.class

JMXCommandLine.class

JMXCommandLine.java

Let’s try if the script works. Make sure you in **/home/ubuntu/scripts** to execute this command :

[PHP]

java -cp JMXCommandLine[/PHP]

and it will return a lot of options that can be used. For example i want to know the wowza server version: ( username “admin” password "admin )

[PHP]java JMXCommandLine -jmx service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -user admin -pass admin getServerVersion[/PHP]

it will return

[PHP]Wowza Media Server 3 Perpetual Edition 3.5.0 build2989[/PHP]

Now the script is running find, lets try to get connection counts. Make sure you play vod using any player ( rtmp,hls,rtsp ) and try execute this command :

[PHP]java -cp /home/ubuntu/scripts JMXCommandLine -jmx service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -user admin -pass admin getConnectionCounts[/PHP]

it will return:

[PHP]total:0 cupertino:0 smooth:0 rtmp:0 rtsp:0[/PHP]

Now it is time to create a bash script:

get\_wowza\_connections.sh

==================

[PHP]#!/bin/bash

TOTALCONNS=`java -cp /home/ubuntu/scripts JMXCommandLine -jmx service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -user admin -pass admin getConnectionCounts`

LIVECONNS=`java -cp /home/ubuntu/scripts JMXCommandLine -jmx service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -user admin -pass admin getConnectionCounts _defaultVHost_:live`

#echo “10”

#echo “11”

echo “$TOTALCONNS”

echo “$LIVECONNS”

[/PHP]

try run the script using full path : [PHP]sh /home/ubuntu/scripts/get\_wowza\_connections.sh[/PHP]

Next install MRTG on UBUNTU

=====================

sudo apt-get install mrtg

create a directory in **/etc/mrtg** and move **/etc/mrtg.cfg** into **/etc/mrtg/mrtg.cfg**

Edit **/etc/mrtg/mrtg.cfg**

[php]

### Global Config Options

RunAsDaemon: Yes

Interval: 5

Logdir: /var/log/

EnableIPv6: no

# webserver htdocs location

WorkDir: /var/www/mrtg

Target[edge1.conns]: `/home/ubuntu/scripts/get_wowza_connections.sh`

Directory[edge1.conns]: wowza

Options[edge1.conns]: nopercent,growright,gauge,noinfo

Title[edge1.conns]: Open Wowza connections – Wowza Master

PageTop[edge1.conns]:

# Open Wowza connections – wowza master

MaxBytes[edge1.conns]: 10000

YLegend[edge1.conns]: # conns

ShortLegend[edge1.conns]: connections

LegendI[edge1.conns]: Total Connections:

LegendO[edge1.conns]: Live Cons

Legend1[edge1.conns]: Open Wowza connections – wowza

[/php]

Create this folder :[PHP] mkdir /var/www/mrtg[/PHP]

Run mrtg : [PHP]/etc/init.d/mrtg start[/PHP]

Check the folder after 5-10 minutes

[PHP]

ls -l /var/www/mrtg[/PHP]

Should be a wowza folder inside the folder

Now, it’s time to install a webserver and I’m using apache.

[PHP]

sudo apt-get install apache[/PHP]

Time to tell apache to use **/var/www/** as DocumentRoot in **/etc/apache2/sites-enabled/000-default**

Start Apache :[PHP] /etc/init.d/apache2 start[/PHP]

Using your browser, point to http:///wowza/\*

Your graph should be there

Written for Wowza Community

=====================

Azril Nazli Alias

Stream.my

Skype: azrilnazli
