Exchange Server Data Collector [DISCONTINUED]

Update [11/21/16]:
  • This project has been discontinued.
  • For Exchange 2010/2013, use the PowerShell version from this LINK
Update [2/20/13]: v2.8
  • Fixed TB size handling of disk space
  • Other stuff that I can't remember anymore :)
Update [7/17/12]:
  • Added Performance Counter Object to extract Log Generation Checkpoint Depth of each storage groups.
  • Added Reminders/Description after each section.
  • These changes are only for Exchange 2003 (so far)



If you manage Exchange Servers, it is always good to have the ability to gather Exchange server status report on demand or by schedule depending on how frequent you want to be informed about the current state of your boxes. Sure you can always log in to your server and check the services, mount status, disk space, mail queues one by one; or you can use commercially available products for a fee. Well as for me, I do not like paying for anything that I can find a free alternative counterpart which can very much do the same thing.

This is why I created this tool I call Exchange Data Collector, and for lack of imagination and creativity it's nick-named as ExDaC2003/ExDaC2010. This program can be run manually or can be set up as Scheduled Task and will gather the information listed below the create an HTML report. The report can be sent via email or you can create a new virtual directory in IIS and host it for online viewing.

The data collected by this small program are:

Mailbox Database

Message Queues

Services

Disk Space




How it works?


When you run this program, listed below are what basically happens.

For Exchange 2003

  1. Read INI file for configuration
  2. Log on to each specified Exchange Servers
    1. Extract Mailbox data using CDOEXM.dll
    2. Extract Mail Queue data using WMI
    3. Extract Services data using WMI
    4. Extract Disk data using WMI 
  3. Save raw data to temporary file
  4. Read raw data and generate the HTML report
  5. Send HTML report via email (if enabled)
  6. Delete temporary files
  7. Cleanup memory allocation
For Exchange 2010
  1. Read INI file for configuration
  2. Initiate a PowerShell runspace and execute PS Scripts for the following:
    1. Extract Mail Store Data
    2. Extract Mail Queue data
    3. Extract Services Data
    4. Extract Disk data 
  3. Save raw data to temporary file
  4. Read raw data and generate the HTML report
  5. Send HTML report via email (if enabled)
  6. Delete temporary files
  7. Cleanup memory allocation
How do I use this?

This is a console application, meaning it's manipulated via command line (sorry no GUI).
Usage:
 ExDaC2003.exe File.ini
 ExDaC2010.exe File.ini
- ExDaC2003.exe/ExDaC2010.exe is the main executable
- File.ini is the configuration file that the programs reads before executing any of its functions. You can create different INI files with different configurations as you wish.

What does FILE.INI contain?

It contains the list of parameters that will be used for all the functions of the program.

Here's an example:
======================================================
[OPTIONS]
;Specify which data is to be reported (TRUE or FALSE)
xDatabase=True
xQueue=True
xService=True
xDisk=True
[SERVERS]
;When specifying multiple values, seperate with semi-colon and must end with semi-colon
;This is the list of the servers that will be queried.
ServerName=DEVSVR01;DEVSVR02;

[SERVICES]
;When specifying multiple values, seperate with semi-colon and must end with semi-colon
;This is the list of services that will be queried for each of the servers listed under the SERVERS section
ServiceName=MSExchangeIS;MSExchangeMTA;MSExchangeSA;MSExchangeMGMT;MSExchangeES;Resvc;IISAdmin;POP3Svc;IMAP4Svc;W3SVC;SMTPSVC;

[SMTP]
;Specify only ONE SMTP server IP and PORT
SMTPServerIP=192.168.56.250
SMTPServerPort=25

;Populate this item if the SMTP server requires authentication, usually this is not the case.
;Accepted values are only TRUE or FALSE
AuthRequired=False

;If AuthRequired=True, you need to fill in this information for the login credentials.
;The format is DOMAIN;UserName;Password
Creds=

[REPORT]
CompanyName=LabWorks

Sender=
administrator@labworks.local

;When specifying multiple recipient, separate with COMMA
Recipients=administrator@labworks.local,administrator2@labworks.local

;This is the Title that will be shown in the HTML report and also the Subject of the email report.
;The program will automatically append the DATE and TIME in this string
ReportTitle=LabWorks Exchange Server Status Report as of

;This item indicates if the program will send the report via email
;EmailReport= True or False
EmailReport=True

;This can be any value. This is needed so that the email report will be less likely to be considered as spam.
XMailer=Exchange Data Collector

;This will be the prefix of the HTML output file. The date and time will automatically be appended.

;The report will be saved here: \objects\reports
ReportFile=LabWorks_

;Specify here the value which will be considered normal for the mail queue, anything above the value specified here will be shown as critical.
QueueThreshold=25

;Specify here the value which will be considered normal for the disk space free percentage, anything above the value specified here will be shown as critical.
DiskThreshold=15


;How old (in days) the last full back up must be before warning - 0 means no checking
LastFullBackupThreshold=7

;How old (in days) will the last incremental backup must be before warning - 0 means no checking
LastIncrementalBackupThreshold=0 


 ;Log file name number threshold before the log sequence should be restarted. anything above the value specified here will be shown as critical.
;Default value for warning as per Microsoft is 950000.
;Max before auto-dismount is 1030000
LogNumberThreshold=950000

;Log file name number threshold before the log sequence should be restarted. anything above the value specified here will be shown as critical.
;Max value before auto-dismount is 1008
LogDepthThreshold=900
======================================================

What does this program require?


The following must be present in the server/computer running this program.

For Exchange 2003
  • .NET Framework 2.0
  • Microsoft Exchange Management Tools
For Exchange 2010
  • .Net Framework 3.5
  • Microsoft Exchange Management Tools
Where can I get this program?

Here:
ExDaC 2003 Version 2.8
ExDaC 2010 Version 2.3

Reminders

  • As always, use with caution as I do not give any warranty or guarantee that this will work for everyone.
Share:

Popular Posts

Powered by Blogger.