Jump to content


Monitor Adobe FMS (Flash Media Server) in Cacti via SNMP

  • Please log in to reply
No replies to this topic

#1 John



  • Administrators
  • 73 posts

Posted 24 November 2013 - 11:04 AM

If you are using Cacti to monitor your servers and you have a server running Adobe FMS, then it would be nice to monitor the connected clients (for example) in Cacti. 
Because Adobe FMS doesn't support snmp, you'll have to create another way. We created a script and configured SNMP to use that script. Via SNMP the results will be passed to Cacti (but you can use any other monitoring server also of course). 
UPDATE: Make sure php-xml and net-snmp-tools are installed on the server. 
Step 1: 
Make sure the admin API over HTTP is enabled in <em>/opt/adobe/fms/conf/fms.ini</em>
Step 2:
You'll need to give a user access to the HTTP commands. Enable the methods you need or use a keyword “All” in /opt/adobe/fms/conf/Users.xml
Step 3:
Place this PHP script somewhere on the server, for example /usr/local/fmsstats/stats.php. Change $adminUser and $adminPassw. 


$xml = new DomDocument();
$url = "$adminUser&apswd=$adminPassw";

if( !isset( $argv[1] ) )
    $argv[1] = 'connected';

$output = getTagContents( $argv[1], $xml);

die( $output );

function getTagContents($tagName,$dom) {
    return $node->nodeValue;
Step 4:
Edit your snmpd.conf (<em>/etc/snmp/snmpd.conf</em>) and add this:
extend . fmsConnected /bin/php /usr/local/fmsstats/stats.php connected
Step 5:
Do a snmpwalk on your server like this: 
[root@server fmsstats]# snmpwalk -v2c -c public .
UCD-SNMP-MIB::extTable.3000.1.0 = INTEGER: 1
UCD-SNMP-MIB::extTable.3000. = STRING: "/bin/php"
UCD-SNMP-MIB::extTable.3000. = STRING: "/usr/local/fmsstats/stats.php connected"
UCD-SNMP-MIB::extTable.3000. = ""
UCD-SNMP-MIB::extTable.3000. = INTEGER: 5
UCD-SNMP-MIB::extTable.3000. = INTEGER: 1
UCD-SNMP-MIB::extTable.3000. = INTEGER: 1
UCD-SNMP-MIB::extTable.3000. = INTEGER: 4
UCD-SNMP-MIB::extTable.3000. = INTEGER: 1
UCD-SNMP-MIB::extTable.3000. = STRING: "393"
UCD-SNMP-MIB::extTable.3000. = STRING: "393"
UCD-SNMP-MIB::extTable.3000. = INTEGER: 1
UCD-SNMP-MIB::extTable.3000. = INTEGER: 0
UCD-SNMP-MIB::extTable.3000. = STRING: "393"
In this example UCD-SNMP-MIB::extTable.3000. gives the connected users. So we are going to use this snmp OID in Cacti. 
Step 6:
In Cacti, go to Console-> Devices -> your server. Then add the graph template "SNMP - Generic OID Template". Then click Create Graphs for this Host and select "Create: SNMP - Generic OID Template". Click Create. 
Fill in the appriopriate fields. In the OID you put in the OID you found at step 5: UCD-SNMP-MIB::extTable.3000.
Create the graph and wait for Cacti to poll. You should see the connected users in a while!
Extra possibilities:
Via your browser, go to the following URL. Change x.x.x.x to the server's IP address and change USERNAME / PASSWORD.  
You'll get an XML output. Just find whatever you want to send to Cacti and use it as a parameter for the php script. For example:
If you want to graph the total connects to the FMS server, simply use this in snmpd.conf:
extend . totalConnects /bin/php /usr/local/fmsstats/stats.php total_connects

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users