-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMonitor.Process.Performance.ConsecSamples.TwoState.mpx
More file actions
104 lines (100 loc) · 5.77 KB
/
Monitor.Process.Performance.ConsecSamples.TwoState.mpx
File metadata and controls
104 lines (100 loc) · 5.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--
%%
Description:
A MONITOR for PROCESS performance data which uses consecutive samples and two states with Alert
CompanyID - is a short abbreviation for your company with NO SPACES OR SPECIAL CHARACTERS ALLOWED
AppName - is a short name for your app with NO SPACES OR SPECIAL CHARACTERS ALLOWED
ClassID - is the targeted class such as your custom class or Windows!Microsoft.Windows.Server.OperatingSystem
UniqueID - should be your ProcessName (without the ".exe") Combined with your CounterName, with NO SPACES OR SPECIAL CHARACTERS ALLOWED. For instance, "WmiPrvSE.exe" and "% Processor Time" would be cleaned up to "WmiPrvSEPercentProcessorTime"
CounterName - The PERFMON counter you wish to monitor such as "% Processor Time" or "Handle Count" or "Private Bytes"
ProcessName - The name of your process exactly as it shows up in PERFMON (Without the .exe, needs to be exactly as seen in perfmon and for multiple processes with the same name ignore the "#1")
FrequencySeconds - The frequency to inspect the perf value. The default is every 60 seconds
Threshold - The threshold for your counter as seen in PERFMON.
Samples - The number of consecutive samples breaching a threshold required before alerting
Version: 1.1
LastModified: 20-Aug-2021
%%
In this fragment you need to replace:
##CompanyID##
##AppName##
##ClassID##
##UniqueID##
##CounterName##
##ProcessName##
##FrequencySeconds##
##Threshold##
##Samples##
This fragment depends on references:
RequiredReference: Alias="Windows", ID="Microsoft.Windows.Library"
RequiredReference: Alias="Health", ID="System.Health.Library"
RequiredReference: Alias="Perf", ID="System.Performance.Library"
RequiredReference: Alias="MSPL", ID="Microsoft.SystemCenter.ProcessMonitoring.Library"
@@Author=Kevin Holman@@
-->
<Monitoring>
<Monitors>
<UnitMonitor ID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor" Accessibility="Public" Enabled="true" Target="##ClassID##" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="MSPL!Microsoft.SystemCenter.Process.ConsecutiveSamplesThreshold.ErrorOnTooHigh" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor.AlertMessage">
<AlertOnState>Warning</AlertOnState> <!-- Warning or Error should match OperationalStates below -->
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity> <!-- Common options for AlertSeverity are MatchMonitorHealth, Information, Warning, Error -->
<AlertParameters>
<AlertParameter1>$Data/Context/ObjectName$</AlertParameter1>
<AlertParameter2>$Data/Context/CounterName$</AlertParameter2>
<AlertParameter3>$Data/Context/InstanceName$</AlertParameter3>
<AlertParameter4>$Data/Context/SampleValue$</AlertParameter4>
<AlertParameter5>$Data/Context/TimeSampled$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ThresholdNotBreached" MonitorTypeStateID="SampleCountNormal" HealthState="Success" />
<OperationalState ID="ThresholdBreached" MonitorTypeStateID="SampleCountTooHigh" HealthState="Warning" /> <!-- HealthState = Warning or Error -->
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>##CounterName##</CounterName>
<ObjectName>Process</ObjectName>
<InstanceName>##ProcessName##</InstanceName>
<Frequency>##FrequencySeconds##</Frequency> <!-- 60 seconds is a good recommended interval for a native module perfmon monitor -->
<!-- <ScaleBy></ScaleBy> --> <!-- If monitoring CPU for a process you must scale by number of logical processors such as $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$ -->
<Threshold>##Threshold##</Threshold>
<NumSamples>##Samples##</NumSamples>
</Configuration>
</UnitMonitor>
</Monitors>
</Monitoring>
<Presentation>
<StringResources>
<StringResource ID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor.AlertMessage" />
</StringResources>
</Presentation>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor">
<Name>##CompanyID## ##AppName## ##ProcessName## ##CounterName## Perf Monitor</Name>
<Description />
</DisplayString>
<DisplayString ElementID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor" SubElementID="ThresholdNotBreached">
<Name>ThresholdNotBreached</Name>
</DisplayString>
<DisplayString ElementID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor" SubElementID="ThresholdBreached">
<Name>ThresholdBreached</Name>
</DisplayString>
<DisplayString ElementID="##CompanyID##.##AppName##.##UniqueID##.Process.Perf.Monitor.AlertMessage">
<Name>##CompanyID## ##AppName## ##ProcessName## ##CounterName## has breached a threshold</Name>
<Description>The monitor breached the threshold:
Object: {0}
Counter {1}
Instance {2}
Has a value {3}
At time {4}
</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPackFragment>