You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
6.6 KiB

<form version="1.1">
<label>Analyze a Mailbox Database - Microsoft Exchange</label>
<fieldset autoRun="true">
<input token="database" type="dropdown" searchWhenChanged="true">
<label>Database</label>
<prefix>Database="</prefix>
<suffix>"</suffix>
<fieldForLabel>Database</fieldForLabel>
<fieldForValue>dbquoted</fieldForValue>
<search>
<query>
|inputlookup dbInformation
|eval dbquoted=replace(Database,"\\\\","\\\\\\")
|dedup Database sortby Database
</query>
<earliest>-1m</earliest>
<latest>now</latest>
</search>
<selectFirstChoice>true</selectFirstChoice>
</input>
<input type="time">
<default>Last 7 days</default>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>Database Growth</title>
<search>
<query>
eventtype=msexchange-database-stats $database$
|eval MBSize=round(FileSize/1048576,2)
|eval MBCopySize=round(CopyFileSize/1048576,2)
|eval MBLogSize=round(LogSize/1048576,2)
|timechart fixedrange=t span=60m max(MBSize) as "DB Size", max(MBCopySize) as "Local Copy Size", max(MBLogSize) as "Log Size"
</query>
</search>
<option name="height">350</option>
<option name="charting.chart">line</option>
<option name="charting.chart.showLines">true</option>
<option name="charting.chart.nullValueMode">connect</option>
<option name="charting.legend.placement">bottom</option>
<option name="charting.axisTitleX.text">Time</option>
<option name="charting.axisTitleY.text">MB</option>
</chart>
</panel>
<panel>
<table>
<title>Last Backups</title>
<search>
<query>
eventtype=msexchange-database-stats $database$
|stats latest(LastFullBackup) as "Full",latest(LastIncrementalBackup) as "Incremental",latest(LastDifferentialBackup) as "Differential",latest(LastCopyBackup) as "Copy"
|transpose
|rename column as "Backup Type", "row 1" as "Date/Time"
</query>
</search>
<option name="count">10</option>
<option name="rowNumbers">false</option>
<option name="showPager">false</option>
</table>
<table>
<title>Log Information</title>
<search>
<query>
eventtype=msexchange-database-stats $database$
|eval LogSize=if(LogSize=="","Not Reported",round(LogSize/1048576,2))
|eval LogPercFree=if(LogPercFree=="","Not Reported",round(LogPercFree,2))
|eval metric=mvappend("LogFolderPath","LogSize","LogPercFree")
|mvexpand metric
|eval value=case(metric=="LogFolderPath",LogFolderPath,metric=="LogSize",LogSize,metric=="LogPercFree",LogPercFree)
|chart latest(value) by metric host
</query>
</search>
<option name="count">10</option>
<option name="rowNumbers">false</option>
<option name="showPager">false</option>
</table>
<table>
<title>User Information</title>
<search>
<query>
eventtype=msexchange-mailbox-usage $database$
|stats latest(TotalItemSize) as TotalItemSize by User,Database
|stats sum(TotalItemSize) as TotalItemSize,dc(User) as UserCount by Database
|eval TotalItemMB=round(TotalItemSize/1048576,2)
|table Database,UserCount,TotalItemMB
|rename UserCount as "User Count", TotalItemMB as "Committed Size (MB)"
|eval _drilldownMod=replace(Database,"\\\\","\\\\\\")
</query>
</search>
<option name="count">10</option>
<option name="rowNumbers">false</option>
<option name="showPager">false</option>
<fields>Database,"User Count","Committed Size (MB)"</fields>
<drilldown>
<link>client_summary?form.database=$row._drilldownMod$&amp;earliest=$earliest$&amp;latest=$latest$</link>
</drilldown>
</table>
</panel>
</row>
<row>
<chart>
<title>Database I/O Latency</title>
<search>
<query>
eventtype=msexchange-perfmon object="MSExchange Database ==&gt; Instances" (instance="_Total" OR instance="Information Store/_Total") counter="I/O Database * Average Latency"
|lookup dbInformation host OUTPUT Database
|search $database$
|timechart fixedrange=t bins=120 avg(Value) as "Latency"
</query>
</search>
<option name="height">350</option>
<option name="charting.chart">line</option>
<option name="charting.chart.nullValueMode">connect</option>
<option name="charting.legend.placement">left</option>
<option name="charting.axisTitleX.text">Time</option>
<option name="charting.axisTitleY.text">ms</option>
</chart>
</row>
<row>
<table>
<title>Backup History</title>
<search>
<query>
eventtype=msexchange-database-stats $database$
|dedup LastFullBackup, LastIncrementalBackup, LastDifferentialBackup, LastCopyBackup consecutive=T
|eval T_LastFullBackup= strptime(LastFullBackup, "%m/%d/%y %H:%M:%S")
|eval T_LastIncrementalBackup= strptime(LastIncrementalBackup, "%m/%d/%y %H:%M:%S")
|eval T_LastDifferentialBackup=strptime(LastDifferentialBackup, "%m/%d/%y %H:%M:%S")
|eval T_LastCopyBackup= strptime(LastCopyBackup, "%m/%d/%y %H:%M:%S")
|eval T_LastFullBackup= if(isnull(T_LastFullBackup),
strptime(LastFullBackup, "%m/%d/%Y %H:%M:%S"),
T_LastFullBackup)
|eval T_LastIncrementalBackup= if(isnull(T_LastIncrementalBackup),
strptime(LastIncrementalBackup, "%m/%d/%Y %H:%M:%S"),
T_LastIncrementalBackup)
|eval T_LastDifferentialBackup=if(isnull(T_LastDifferentialBackup),
strptime(LastDifferentialBackup, "%m/%d/%Y %H:%M:%S"),
T_LastDifferentialBackup)
|eval T_LastCopyBackup= if(isnull(T_LastCopyBackup),
strptime(LastCopyBackup, "%m/%d/%Y %H:%M:%S"),
T_LastCopyBackup)
|delta T_LastFullBackup as D_LastFullBackup
|delta T_LastIncrementalBackup as D_LastIncrementalBackup
|delta T_LastDifferentialBackup as D_LastDifferentialBackup
|delta T_LastCopyBackup as D_LastCopyBackup
|eval Type=case(D_LastFullBackup!=0, "Full",
D_LastIncrementalBackup!=0, "Incremental",
D_LastDifferentialBackup!=0, "Differential",
D_LastCopyBackup!=0, "Copy")
|eval Time=case(D_LastFullBackup!=0, LastFullBackup,
D_LastIncrementalBackup!=0, LastIncrementalBackup,
D_LastDifferentialBackup!=0, LastDifferentialBackup,
D_LastCopyBackup!=0, LastCopyBackup)
|search Type=*
|sort -Time
|eval FileSize=FileSize/(1024*1024)
|rename Time as "Date/Time", FileSize as "Database Size (MB)"
|table "Date/Time", Type, "Database Size (MB)"
</query>
</search>
<option name="count">10</option>
<option name="rowNumbers">false</option>
<option name="showPager">true</option>
</table>
</row>
</form>