ilse@vancriekinge.com www.Pro-Exchange.be
Objectives
Who needs reports? What kind of data is available? How to gain access to the data? How to present the acquired data?
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Introduction
Reports are critical to a healthy Exchange org
understand, monitor, and track who-whatwhen-where-how usage data
mail usage by user message traffic patterns delivery times historical usage trends message content reporting ...
Requirements
Microsoft Exchange Server Active Directory Data extraction tools
Microsoft Log Parser 2.2 A dash of scripting
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Process Flow
1. 2. 3. 4. Extract data from source Load data into SQL Server Create report in Visual Studio Publish report
Process Flow
Data Sources Exchange
Message Tracking Logs Active Directory User & Mailbox Info Exchange Mailbox Info
Log Parser
CSVDE
WMI
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Sources of Data
Exchange message tracking logs Active Directory
HomeMDB, quota settings, ... User Information
Options:
Remove log files [older than (days)] Exchange 2000/2003: Enable subject logging and display Exchange 2003: Location to store log files
Source: http://support.microsoft.com/?kbid=246965
Message tracking event IDs in Exchange Server 2003 1027: Message submission by store 1028: Message delivery Overview: http://support.microsoft.com/?kbid=821905
# Date
2006-2-7
10:28:41 GMT NTS00 ivcrieki@yahoo.com 1027 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 0 0 511 1 2006-2-7 10:28:41 GMT 0 c=US;a= ;p=First Organizati;l=NTS00060207102841Z-5 Will Public Folders disappear? EX:/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ILSE 10:28:41 GMT 1019 1 10:28:41 GMT 1025 1 10:28:41 GMT 1024 1 NTS00 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 2006-2-7 10:28:41 GMT 0 NTS00 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 2006-2-7 10:28:41 GMT 0 NTS00 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 2006-2-7 10:28:41 GMT 0 0 0 0 0 0 ivcrieki@yahoo.com 0 511 Will Public Folders disappear? ivcrieki@yahoo.com 0 511 Will Public Folders disappear? ivcrieki@yahoo.com 0 511 Will Public Folders disappear? ivcrieki@yahoo.com 0 511 Will Public Folders disappear? ivcrieki@yahoo.com 0 511 Will Public Folders disappear?
2006-2-7
2006-2-7
2006-2-7
2006-2-7
10:28:41 GMT NTS00 1033 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 1 2006-2-7 10:28:41 GMT 0 Ilse.VanCriekinge@matisse.edu 10:28:41 GMT NTS00 1034 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 1 2006-2-7 10:28:41 GMT 0 Ilse.VanCriekinge@matisse.edu -
2006-2-7
Column
Date Time Client-IP Client-Hostname Partner-Name Server-Hostname Server-IP Recipient-Address Event-ID MSGID Priority Recipient-Report-Status total-bytes Number-Recipients Origination Time Encryption Service-Version Linked-MSGID Message-Subject Sender-Address
Data
2006-2-7 10:28:41 GMT NTS00 ivcrieki@yahoo.com 1027 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 0 0 511 1 2006-2-7 10:28:41 GMT 0 c=US;a= ;p=First Organizati;l=NTS00-060207102841Z-5 Will Public Folders disappear? EX:/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ILSE
Log Parser
Log Parser 2.2 can be used to reformat the tracking logs into a format digestible by SQL Server Log Parser is available for download from the Microsoft Download Center: http://www.microsoft.com/download
Log Parser allows users to treat log files and other information as SQL tables, the rows of which can be queried, processed, and formatted in different ways Born around 2000, as a utility to test the logging mechanisms of IIS Latest release = version 2.2 Designed and engineered with the vision of helping users achieve their dataprocessing goals in a simple, fast, and powerful way.
Building Queries
Output Records
(Output Formats)
Command:
-i:W3C -o:TSV
W3C input format parses log files in the W3C Extended Log File Format TSV output format creates text file formatted according to the Tab-Seperated-Values convention
2006-02-07 10:28:41 NTS00 ivcrieki@yahoo.com 1027 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 0 0 511 1 2006-02-07 10:28:41 0 c=US;a= ;p=First Organizati;l=NTS00-060207102841Z-5 Will Public Folders disappear? EX:/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ILSE -
Column
DateTime Client-IP Client-Hostname Partner-Name Server-Hostname Server-IP Recipient-Address Event-ID MSGID Priority Recipient-Report-Status total-bytes Number-Recipients Origination Time Encryption Service-Version Linked-MSGID Message-Subject Sender-Address
Data
2006-02-07 10:28:41 NTS00 ivcrieki@yahoo.com 1027 3ADF255035AF154496E38B1C234B9C5D442F@nts00.matisse.edu 0 0 511 1 2006-02-07 10:28:41 0 c=US;a= ;p=First Organizati;l=NTS00-060207102841Z-5 Will Public Folders disappear? EX:/O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ILSE
Introducing CSVDE
csvde.exe installed on Windows 200X Server by default Can be run from Windows 2000 Pro or XP Professional Can be used to import and export data from Active Directory by using files that store data in the comma-separated value (CSV) file format standard Also supports batch operations that are based on CSV
CSVDE Syntax
CSVDE
-f file to export to -s servername -d LDAP search root -r LDAP search filter (default objectClass=*) -l list of attributes to export -u Unicode format (important for DBCS)
CSVDE Example
Extract a specified list of all Person objects in the Matisse domain: CSVDE f f:\info\ad\directory.csv -s NTSMATISSE -d "dc=matisse,dc=edu" -r "(&(objectCategory=Person)(homeMDB=*))" -l DN,legacyExchangeDN,mail,homeMDB,mDBUseD efaults,mDBOverQuotaLimit,mDBStorageQuot a,mDBOverHardQuotaLimit,department -u
Source 3: WMI
Windows Management Instrumentation Management technology allowing scripts to monitor and control managed resources throughout the network Resources include hard drives, file systems, operating system settings, processes, services, shares, registry settings, networking components, event logs, users, and groups Built into clients with Windows 2000 or above, and can be installed on any other 32-bit Windows client WMI is easy to consume via script
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Table Joins
MsgTrackingLogs, MailboxSizeData and Active_Directory_Info can all be joined Active_Directory_Info and MailboxSizeData join on [legacyExchangeDN] Then join Active_Directory_Info to MsgTrackingLogs on [Recipient-Address]
Join
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Deploy
Check project properties Check TargetServerUrRL =
http://myserver.mydomain.com/ReportServer
Agenda
Introduction
Process flow Sources of data Pulling it all together: Joins Report creation
Automation
Automation
Automate data gathering and import with:
SQL 2000: Data Transformation Services (DTS) SQL 2005: SQL System Integration Services (SSIS)
Summary
Reports are vital to the health of your messaging infrastructure Basic reports are fairly easy to develop Three key data sources: AD, Tracking logs, WMI
This session gave you a very limited view of all the power you have when you use the available tools to create custom reports!
Resources
Microsoft Log Parser Toolkit, Gabriele Giuseppini&Mark Burnett, Syngress http://www.logparser.com/ http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf84c25-91b2-f8d975cf8c07&displaylang=en http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx http://support.microsoft.com/default.aspx?scid=kb;en-us;246965
http://support.microsoft.com/default.aspx?scid=kb;en-us;821905 http://www.microsoft.com/sql
LogParser 2.2
http://msdn.microsoft.com/vstudio/
http://msdn.microsoft.com/library/default.asp?url=/library/enus/e2k3/e2k3/_wmiref_cl_Exchange_Mailbox.asp