Website-Icon Granikos GmbH & Co. KG

Parse-MailContent

Description

This script fetches emails from a given monitoring mailbox by searching email messages for a given subject string. In this case, email messages sent by the ENow Management Suite (http://enowsoftware.com/). Status messages are parsed to extract Disk Performance alert data for further processing in Power BI.

The mailbox is queried using Exchange Web Services (EWS). AutoDiscover identifies the EWS endpoint.

The script exports the following columns for further processing:

You can easily adjust the script to fit your requirements. Search for other message subjects and parse for other content in the message body.

Requirements

Examples

Code Samples

# Run script using default parameters
.\Get-EmailContent.ps1

Example output

"COMPUTER";"DATE";"TIME";"IO";"THRESHOLD";"VALUE"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"109,90"
"EXLABP08";"19.05.2017";"11:15:38";"WRITE";"Warning";"23,61"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"80,13"
"EXLABP08";"19.05.2017";"11:15:38";"WRITE";"Warning";"21,58"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"33,01"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"53,04"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"24,24"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"40,01"

Power BI report examples

This example shows that P04 and P08 have exceeded the critical and warning state disk performance thresholds more often than the other servers.

The next example shows the same date in a different report.

Version History

Links

Follow

Kurz-URL | Short URL: https://granikos.eu/go/UrxR
Die mobile Version verlassen