This plugin monitors the correct working of the Exchange mail system from the client point of view. For more information visit the following webpage: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=573
4. 2 INTRODUCTION
The main aim of this plugin is to monitor the correct working of the Exchange mail system from the
client point of view. To do this, you should use the Microsoft Outlook mail client, who will receive
an email in a periodic way and we will check that the mail will arrive in an specific time.
2.1. Plugin Performance
The plugin checks a file of a mail user through the Outlook program. In this query it could do two
kinds of checks: to calculate the email sending latency or to check that an specific email arrived.
2.1.1. Email sending Latency
The plugin searchs in the entry folder the emails that have an specific string text of reference.
Before calculating the sending-reception email latency, it is checked that this email arrived in a
reference intervale that guarantees that the emails are sent in a periodical way.
Once we get an email that has arrived in the time intervale, it compares the sending data (it should
be in the email subject) with the reception date that Exchanges has and it will return the difference,
that is the latency beetween the sending and the reception.
If the plugin finds the email with the reference string and this has arrived in the last interval, then
the plugin will return the sending-reception latency. If on the contrary, the plugin doesn't find the
email with the reference string or it comes out of the specified interval, then the plugin will not
return anything and the module that monitors this query will pass to the Unknown status.
2.1.2. Check mail entry
If the parameter only_check (will be explained after) the plugin will search a mail with the text
string of refernced and in this case it returns 1.
This way it doesn't check any kind o arriving interval in mails, so it will be necessary to delete the
email with the reference string in a manual way so if not, the monitoring will return false positives.
3 COMPATIBILITY MATRIX
Page 4
5. The plugin compatibility matrix is the following:
Systems where it has been tested
• Windows Server 2008 Server R2
• Outlook 2010
Systems where it should work • Same system or higher.
It is possible that due to changes in the Outlook future versions it would be necessary to do changes
in the plugin.
4 DOCUMENTATION PROVIDED BY THE REQUESTING AREA
The requesting area must send the following information:
• Machine requirements:
Page 5
6. ◦ Pandora FMS agent installed.
◦ Outlook 2010 installed and properly configured with an account hosted in the Exchange
server.
• Information for modules:
◦ User account used to monitor, for example user@company.com.
◦ Folder which has the emails to monitor, for example “Inbox”.
◦ String to search into mail subject.
◦ Type of check: only_check (only check if there is a mail) or interval (checks mail
latency)
5 MODULES PROVIDED BY THE PLUGIN
The plugin returns two types of modules:
• Send-receive latency which returns the email's delay from send to reception.
Page 6
7. • Check mail arrival which checks whether a mail was received or not
6 REQUISITES
The plugin requires the following software and configuration to work:
• Windows Operative System with the con agente de Pandora FMS agent installed.
• ActivePerl 5.8.8 or higher.
Page 7
8. • Outlook 2010 installed and configured with the account where the emails to monitor are
sended. The Outlook program shoud be executing at any moment
• To allow the access of external programs to the Outlook 2010 emails.
• Execution of the Pandora FMS agent as process.
• Mantain the session of the user that executes the agent as process always
active
• Periodical purge of emails of the account used to monitor, in all moment the maximum
number of emails should not be higher than 300 emails.
6.1. Problem windows Execute MAPI (Outlook) as service
There is a problem documented by Windows that consists on that is not posible to execute Outlook
due to a very strict requisites of the MAPI protocol, that could be checked in this KB:
http://support.microsoft.com/kb/237913
For this reason, the Pandora FMS agent that executes this plugin, should be executed as process.
To do this, you shoud open a terminal to the Pandora agent installing directory and execute the
following command:
PandoraAgent.exe –process
6.2. Outlook 2010 Security Configuration
In the Outlook 2010 program configuration options, you will find the Trust Center. In it you
should configure the access to programming in the following way:
To could configure this parameter, the user should be local administrator in the Windows system.
Page 8
9. 7 INSTALLING
To install the plugin you will only need to copy the file in the place of the machine that has installed
the Pandora FSM agent for Windows. We will explain later how to create the corresponding
modules in the agent.
8 MONITORING CONFIGURATION
Page 9
10. 8.1. Plugin Parameters
The plugin configuration parameters are the following:
• account: email account where the mails to monitor are received. For example:
micuenta@empresa.com
• folder: folder that contains the emails to monitor. For example: Inbox
• needle: String that contains the subject of the mails to monitor.
• Auxiliary parameters:
◦ only_check: It only returns 1 or 0 when it finds the email with the subject specified, IT
DOESN'T CHECK THE INTERVAL OF THE MAILS.
◦ interval: maximum old interval for the mail to monitor in seconds. After this
parameter, it is necesary to add the interval in seconds.
An example of modules to execute the plugin would be:
module_exec perl "C:UsersPandoraDesktopcheck_exchange_outlook.pl"
"usuario@microrreo.com" "Bandeja de entrada" "CadenaRef" interval 900
module_exec perl "C:UsersPandoraDesktopcheck_exchange_outlook.pl"
"usuario@microrreo.com" "Bandeja de entrada" "CadenaRef" only_check
8.2. Configuring Control Emails
If you don't use the only_check the mail that is going to be monitored should have a
text format in the subject.The required format is the the following:
Sending email monitoring 02/14/2012 11:00:00
It is very important to respect the order of each element (Subject date)
(mm/dd/yyyy).
The first part of the attached, before the date, will be which the administrator will write in
the needle parameter to do the search. In our example, the needle parameter is:
222
Sending Email monitoring
If you use the only_check parameter you don't have to use any kind of format for the
attached and the needle parameter should be the same as the email subject. For
Page 10
11. example. The mail subject is:
Sending email system test
The needle parameter will be:
Sending email system test
8.3. Checking the interval
The plugin checks that the last email get and that corresponds with the needle parameter
has arrived before the time intervale finish.
To do the check we use the date of arrival that Exchanges shows when an email is received
and this is compared with the hour of the system to check that the intervale is fulfilled.
Supposing that are the 15:00:00 of the day 16/02/2012, and that we have and interval of 1
hour and that we have received the last email with the following data:
• Subject: Report 02/14/2012 11:00:44
• Date arrival: 14:30:00 del día 16/02/2012
Although in the subject any other date would be written, the right one is that of the arrival,
so this email is in the interval.
9 CREATING ONE MODULE IN THE AGENT
This plugin is used to execute modules in the agent, so they should be defined in the agent
configuration file. An example of one module could be this:
Page 11
12. module_begin
module_type generic_data
module_name Latencia MailRef
module_exec perl "C:UsersPandoraDesktopcheck_exchange_outlook.pl" "usuario@microrreo.com"
"Bandeja de entrada" "MailRef" interval 900
module_end
A second example could use the only_check plugin function:
module_begin
module_type generic_data
module_name Check MailRef
module_exec perl "C:UsersPandoraDesktopcheck_exchange_outlook.pl" "usuario@microrreo.com"
"Bandeja de entrada" "MailRef" only_check
module_end
Page 12