Using the FMS API for On-Prem Adobe Connect

For monitoring purposes, you can build an application which utilizes additional API calls that hook directly into the Flash Media Administration Server services.  This is undocumented but may help you with additional monitoring or statistics on the FMS side.

A full list of FMS/FCS API entries for the 9.1 version of FMS (which is version 4) can be found here:
http://help.adobe.com/en_US/flashmediaserver/adminapi/WSa4cb07693d12388431df580a12a34991ebc-8000.html

Previously, as an Adobe Connect administrator, you probably have always had the additional FMS service (Flash Media Administration Server) shut off.  In order to utilize the API, you need to make sure this service is running:

fmsadmin

In order to hit the API for FMS, you need to use the FMS admin username and password.

This can be found in:

[install drive]:\Connect\9.1.1\comserv\conf

# An administrator for the server. Users.xml
DEFAULT_FCS_USER=XXXXXX
# Password for this vhost administrator. Users.xml
DEFAULT_FCS_PASSWORD=XXXXXX

In order to use all the calls (or a select few, depending on your desire), you need to modify one additional FMS file (see below).

Set permissions for Administration API method calls over HTTP

Open the Users.xml file in the [install drive]:\Connect\9.1.1\comserv\win32\conf folder.
In the <Allow> element, enter method names in a comma-delimited list to allow HTTP requests to execute Administration API calls. For example, the following code allows only the ping() and changePswd() methods:

<AdminServer>
<HTTPCommands>
<Enable>${USERS.HTTPCOMMAND_ALLOW}/Enable>
<Allow>ping,changePswd</Allow>
<Deny>All</Deny>
<Order>Deny,Allow</Deny>
</HTTPCommands>
</AdminServer>

Note: For allowing ALL API commands, you can simply REMOVE the ‘All’ from the <Deny> tag and save the file as-is.  No other edit is necessary.

There are additional XML elements in the Users.xml file that give you finer control over permissions. For more information, see XML configuration files reference.

Save the file and restart Flash Media Administration Server service.

 

For API calls to FMS, the structure looks like this (with ‘ping()’ as the API call we are using):

http://{serverURL}:1111/admin/ping?auser=XXXXX&apswd=XXXXXX

where auser= the admin username
where apswd= the admin password

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 11:40:45 AM</timestamp>
</result>

 

Some useful things to use this for…

Say I have a meeting opened up on the server.  That meeting has the sco-id of: 11137.

If you make the call to first add the meetingas3app app (the meeting application on Adobe Connect):

http://{serverURL}:1111/admin/addApp?auser=XXXXXX&apswd=XXXXXXX&appName=meetingas3app

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 12:05:19 PM</timestamp>
</result>

 

Then you can run the following API :

http://{serverURL}:1111/admin/getActiveInstances?auser=XXXXXX&apswd=XXXXXX

Which will give you all the meeting app instances running on the server (in the below case, I only have one server meeting running):

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 12:07:19 PM</timestamp>
<data>
<_0>meetingas3app@localhost:8506/7/11137</_0>
</data>
</result>

Then you can run the following API:

http://{serverURL}:1111/admin/getInstanceStats?auser=XXXXXX&apswd=XXXXXX&appInst=meetingas3app@localhost:8506/7/11137

Which gives you the ‘<rtmp_connects>XXX</rtmp_connects>’ value. This is the number of Connections into the Meeting by users.  In the case below, there are 2 users connected.  For a full range of what each param actually signifies, please refer to the doc linked at the top of the article, which will explain each field returned in the XML.

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 12:18:39 PM</timestamp>
<data>
<_0>
<name>_defaultRoot_:_defaultVHost_:meetingas3app:</name>
<bytes_in>30626</bytes_in>
<bytes_out>1308849</bytes_out>
<bw_in>24</bw_in>
<bw_out>315</bw_out>
<msg_in>912</msg_in>
<msg_out>1079</msg_out>
<msg_dropped>0</msg_dropped>
<total_connects>2</total_connects>
<total_disconnects>0</total_disconnects>
<connected>2</connected>
<accepted>0</accepted>
<rejected>0</rejected>
<rtmp_connects>2</rtmp_connects>
<rtmfp_connects>0</rtmfp_connects>
<normal_connects>0</normal_connects>
<virtual_connects>0</virtual_connects>
<group_connects>0</group_connects>
<service_connects>0</service_connects>
<service_requests>0</service_requests>
<admin_connects>0</admin_connects>
<debug_connects>0</debug_connects>
<total_instances_loaded>0</total_instances_loaded>
<total_instances_unloaded>0</total_instances_unloaded>
<server_bytes_in>0</server_bytes_in>
<server_bytes_out>0</server_bytes_out>
</_0>
<_1>
<name>
_defaultRoot_:_defaultVHost_:meetingas3app::128059_
</name>
<launch_time>10/29/2013 11:57:55 AM</launch_time>
<pid>1348</pid>
<core_id>-1</core_id>
<up_time>1243.083288</up_time>
<mode>remote</mode>
<debug>false</debug>
<script>
<name>
_defaultRoot_:_defaultVHost_:meetingas3app::128059_
</name>
<time_high_water_mark>0</time_high_water_mark>
<queue_size>0</queue_size>
<total_processed>0</total_processed>
<queue_high_water_mark>0</queue_high_water_mark>
<total_process_time>0</total_process_time>
<memory_used>0</memory_used>
<gc_memory_used>0</gc_memory_used>
<max_memory_used>0</max_memory_used>
<gc_count>0</gc_count>
<server_gc_count>0</server_gc_count>
<last_gc_duration>0</last_gc_duration>
<max_gc_duration>0</max_gc_duration>
<avg_gc_duration>0</avg_gc_duration>
</script>
</_1>
<_2>
<name>
_defaultRoot_:_defaultVHost_:meetingas3app::128060_
</name>
<launch_time>10/29/2013 12:13:26 PM</launch_time>
<pid>6608</pid>
<core_id>-1</core_id>
<up_time>312.138210</up_time>
<mode>remote</mode>
<debug>false</debug>
<script>
<name>
_defaultRoot_:_defaultVHost_:meetingas3app::128060_
</name>
<time_high_water_mark>0</time_high_water_mark>
<queue_size>0</queue_size>
<total_processed>0</total_processed>
<queue_high_water_mark>0</queue_high_water_mark>
<total_process_time>0</total_process_time>
<memory_used>0</memory_used>
<gc_memory_used>0</gc_memory_used>
<max_memory_used>0</max_memory_used>
<gc_count>0</gc_count>
<server_gc_count>0</server_gc_count>
<last_gc_duration>0</last_gc_duration>
<max_gc_duration>0</max_gc_duration>
<avg_gc_duration>0</avg_gc_duration>
</script>
</_2>
</data>
</result>

 

Other interesting APIs:

getServerStats()

http://{serverURL}:1111/admin/getServerStats?auser=XXXXXX&apswd=XXXXXX

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 12:15:05 PM</timestamp>
<data>
<launchTime>10/28/2013 7:09:05 AM</launchTime>
<uptime>104760</uptime>
<cpus>2</cpus>
<cpu_Usage>0</cpu_Usage>
<num_cores>3</num_cores>
<memory_Usage>80</memory_Usage>
<physical_Mem>104067072</physical_Mem>
<io>
<msg_in>5194</msg_in>
<msg_out>16075</msg_out>
<msg_dropped>0</msg_dropped>
<bytes_in>10694741</bytes_in>
<bytes_out>76412729</bytes_out>
<reads>17817</reads>
<writes>24842</writes>
<bw_in>900</bw_in>
<bw_out>28854</bw_out>
<total_connects>11</total_connects>
<total_disconnects>6</total_disconnects>
<connected>5</connected>
<rtmp_connects>7</rtmp_connects>
<rtmfp_connects>0</rtmfp_connects>
<normal_connects>2</normal_connects>
<virtual_connects>2</virtual_connects>
<group_connects>2</group_connects>
<service_connects>1</service_connects>
<service_requests>3</service_requests>
<admin_connects>0</admin_connects>
<debug_connects>0</debug_connects>
<total_threads>404</total_threads>
<working_threads>5</working_threads>
<swf_verification_attempts>0</swf_verification_attempts>
<swf_verification_exceptions>0</swf_verification_exceptions>
<swf_verification_failures>0</swf_verification_failures>
<swf_verification_unsupported_rejects>0</swf_verification_unsupported_rejects>
<swf_verification_matches>0</swf_verification_matches>
<swf_verification_remote_misses>0</swf_verification_remote_misses>
<server_bytes_in>0</server_bytes_in>
<server_bytes_out>0</server_bytes_out>
<rtmfp_lookups>0</rtmfp_lookups>
<rtmfp_remote_lookups>0</rtmfp_remote_lookups>
<rtmfp_remote_lookup_requests>0</rtmfp_remote_lookup_requests>
<rtmfp_redirects>0</rtmfp_redirects>
<rtmfp_remote_redirects>0</rtmfp_remote_redirects>
<rtmfp_remote_redirect_requests>0</rtmfp_remote_redirect_requests>
<rtmfp_forwards>0</rtmfp_forwards>
<rtmfp_remote_forwards>0</rtmfp_remote_forwards>
<rtmfp_remote_forward_requests>0</rtmfp_remote_forward_requests>
</io>
</data>
</result>

 

getActiveVhostStats() 

http://{serverURL}:1111/admin/getActiveVhostStats?auser=XXXXXX&apswd=XXXXXX

<result>
<level>status</level>
<code>NetConnection.Call.Success</code>
<timestamp>10/29/2013 12:11:05 PM</timestamp>
<data>
<_0>
<vhost_name>_defaultVHost_</vhost_name>
<Aggregate>
<bytes_in>36443</bytes_in>
<bytes_out>2958530</bytes_out>
<bw_in>9</bw_in>
<bw_out>139</bw_out>
<msg_in>620</msg_in>
<msg_out>1004</msg_out>
<msg_dropped>0</msg_dropped>
<total_connects>4</total_connects>
<total_disconnects>0</total_disconnects>
<connected>4</connected>
<accepted>2</accepted>
<rejected>0</rejected>
<rtmp_connects>4</rtmp_connects>
<rtmfp_connects>0</rtmfp_connects>
<normal_connects>1</normal_connects>
<virtual_connects>1</virtual_connects>
<group_connects>1</group_connects>
<service_connects>1</service_connects>
<service_requests>1</service_requests>
<admin_connects>0</admin_connects>
<debug_connects>0</debug_connects>
<total_instances_loaded>2</total_instances_loaded>
<total_instances_unloaded>0</total_instances_unloaded>
<total_apps>2</total_apps>
<swf_verification_attempts>0</swf_verification_attempts>
<swf_verification_exceptions>0</swf_verification_exceptions>
<swf_verification_failures>0</swf_verification_failures>
<swf_verification_unsupported_rejects>0</swf_verification_unsupported_rejects>
<swf_verification_matches>0</swf_verification_matches>
<swf_verification_remote_misses>0</swf_verification_remote_misses>
<server_bytes_in>0</server_bytes_in>
<server_bytes_out>0</server_bytes_out>
</Aggregate>
<_0>
<app_name>meetingas3app@localhost:8506</app_name>
<bytes_in>15496</bytes_in>
<bytes_out>656296</bytes_out>
<bw_in>9</bw_in>
<bw_out>118</bw_out>
<msg_in>463</msg_in>
<msg_out>547</msg_out>
<msg_dropped>0</msg_dropped>
<total_connects>1</total_connects>
<total_disconnects>0</total_disconnects>
<connected>1</connected>
<accepted>0</accepted>
<rejected>0</rejected>
<rtmp_connects>1</rtmp_connects>
<rtmfp_connects>0</rtmfp_connects>
<normal_connects>1</normal_connects>
<virtual_connects>0</virtual_connects>
<group_connects>0</group_connects>
<service_connects>0</service_connects>
<service_requests>0</service_requests>
<admin_connects>0</admin_connects>
<debug_connects>0</debug_connects>
<total_instances_loaded>1</total_instances_loaded>
<total_instances_unloaded>0</total_instances_unloaded>
<swf_verification_attempts>0</swf_verification_attempts>
<swf_verification_exceptions>0</swf_verification_exceptions>
<swf_verification_failures>0</swf_verification_failures>
<swf_verification_unsupported_rejects>0</swf_verification_unsupported_rejects>
<swf_verification_matches>0</swf_verification_matches>
<swf_verification_remote_misses>0</swf_verification_remote_misses>
<server_bytes_in>0</server_bytes_in>
<server_bytes_out>0</server_bytes_out>
</_0>
<_1>
<app_name>meetingas3app</app_name>
<bytes_in>20947</bytes_in>
<bytes_out>2302234</bytes_out>
<bw_in>0</bw_in>
<bw_out>21</bw_out>
<msg_in>157</msg_in>
<msg_out>457</msg_out>
<msg_dropped>0</msg_dropped>
<total_connects>3</total_connects>
<total_disconnects>0</total_disconnects>
<connected>3</connected>
<accepted>2</accepted>
<rejected>0</rejected>
<rtmp_connects>3</rtmp_connects>
<rtmfp_connects>0</rtmfp_connects>
<normal_connects>0</normal_connects>
<virtual_connects>1</virtual_connects>
<group_connects>1</group_connects>
<service_connects>1</service_connects>
<service_requests>1</service_requests>
<admin_connects>0</admin_connects>
<debug_connects>0</debug_connects>
<total_instances_loaded>1</total_instances_loaded>
<total_instances_unloaded>0</total_instances_unloaded>
<swf_verification_attempts>0</swf_verification_attempts>
<swf_verification_exceptions>0</swf_verification_exceptions>
<swf_verification_failures>0</swf_verification_failures>
<swf_verification_unsupported_rejects>0</swf_verification_unsupported_rejects>
<swf_verification_matches>0</swf_verification_matches>
<swf_verification_remote_misses>0</swf_verification_remote_misses>
<server_bytes_in>0</server_bytes_in>
<server_bytes_out>0</server_bytes_out>
</_1>
</_0>
</data>
</result>

 

Comments are closed.