This plugin monitores the state of synchronization between the mobile device and the exchange server. For more information visit the following webpage: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=572
4. 2 INTRODUCTION
The present document has been written to explain the ActiveSync monitoring in detail. This
technology consists on a data synchronizing protocol for mobile devices with Exchange servers, and
its monitoring with Pandora FMS is done through the execution of one plugin that checks the state
of synchronization between the mobile device and the Exchange server.
In the following sections we wil explain the way the plugin works, and also the configuration that
you should do in Pandora FMS in order to do a correct monitoring of this technology.
3 COMPATIBILITY MATRIX
Page 4
5. The plugin compatibility matrix is the following:
Systems where it has been tested
• Windows Server 2008 Server R2
• Microsoft Exchange 2010 with
ActiveSync
Systems where it should work • Same system or higher.
4 DOCUMENTATION PROVIDED BY THE REQUESTING AREA
The requesting area must send the following information:
• User created in Exchange server in order to perform monitoring tasks. The user must have
Page 5
6. the correct permissions.
• Hostname of Exchange server.
5 MODULES PROVIDED BY THE PLUGIN
The plugin returns these modules:
• Exchange server synchronization status
• Availability response /sec
Page 6
7. • Average Hang Time
• Average latency for LDAP
• Request average time
6 REQUIREMENTS
Before starting to display the ActiveSync monitoring, we have to be sure that we have a created
mail user, with the corresponding password and domain in the Exchange server with which we
should check the synchronization, and also the server hostname and the necessary permissions as
to that user and mobile device could synchronize with the server.
Page 7
8. Once it has been done. We have to check that the user could have access to its mail box in the
Exchange server, for example, in a graphic way, and if the access is done sucessfully, we can start to
display the monitoring of that service.
We will do the monitoring through the fictitious mail account pandoraas@dominio.com. The
connection will be done to the server maileu.dominio.com and it will synchronized with the
mailbox folder PandoraFolder.
By last, to execute the script, it should be necessary that the system has the curl tool installed, so it
will be through this command as the script will check the state of the synchronization with the
Exchange ActiveSync server.
Page 8
9. 7 PLUGIN CHECK_ACTIVESYNC.SH
We will do the ActiveSync monitoring from the check_activesync.sh script, which main
objective will be to check if the synchronization with the Exchange server is working correctly, or
on the contrary, there is some problem.
This script will return 1 if the check has been satisfactory, or 0 if the check has been unsucessful,
due to an error in credentials, folder to synchronize, etc.
We could check how to use the plugin correctly, executing the script without any argument
As we can check in the previous image, we should pass the necessary data to the plugin in order to
connect with the mail box. Data like the domain, the user and the password. It is also necessary to
show it the hostname of the ActiveSync server and a folder with which to check the
synchronization . The devices ID data, and also the kind of devices, are necessary identification
data that should be sent when doing the synchronization with a mail box in order that the server
keeps a historic of devices that synchronizes with that mail account (we can ge this synchronization
historical executing the following command in the PowerShell console: Get-ActiveSyncDevice
-Mailbox usuario@dominio.com)
The script has available a binary file, activesync.txt, for its correct execution. The path where
this binary file is located should be specified in the script code. In the following screenshot we
could see the code piece where the binary path should be configured:
Once it has been done, we could execute the script with the data of our mail account and check if
Page 9
10. the connection is correctly done. For it we execute the following command in the Pandora server
command line:
As we can check, the script returns a correct value (1), which means that synchronization check to
the ActiveSync has been correct. We can force the execution to it returns a wrong check (0),
modifying for example the parameter of the fold to synchronize for a one that doesn't exist in the
mail account, as we can see in the following example:
The paremeters DeviceID and DeviceType could not belong to a real device,
ActiveSync server uses this paremeters to write them in the access log.
To use the plugin in Pandora FMS just add the plugin as other and create the modules you want.
8 ACTIVESYNC PERFCOUNTERS
We can add the following performance counters for the ActiveSync monitoring in the Exchange
Page 10
11. server or servers:
• MSExchange ActiveSyncAvailability Requests/sec
• MSExchange ActiveSyncAverage Hang Time
• MSExchange ActiveSyncAverage LDAP Latency
• MSExchange ActiveSyncAverage Request Time
To do this we could use the PerfCounter plugin which executes the required queries.
Page 11