-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVMMonitorsFromStdMP.mpx
277 lines (275 loc) · 14.3 KB
/
VMMonitorsFromStdMP.mpx
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- this fragments contains monitoring rules copied from Microsoft.WIndows-HyperV.2012.R2.Monitoring management pack, replaced Microsoft with QND -->
<TypeDefinitions>
<ModuleTypes>
<DataSourceModuleType ID="Microsoft.Windows.HyperV.DiskPartitionSpaceProvider.Subscriber" Accessibility="Public" Batching="false">
<Configuration />
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Microsoft.Windows.HyperV.DiskPartitionSpaceProvider.PropertyBagProvider">
<ManagementGroupId>$Target/ManagementGroup/Id$</ManagementGroupId>
<ChannelId>3DEA9314-3887-46B8-B615-752CA2D007E8</ChannelId>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS" />
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>
<DataSourceModuleType ID="Microsoft.Windows.HyperV.DiskPartitionSpaceProvider.PropertyBagProvider" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element name="ManagementGroupId" type="xsd:string" />
<xsd:element name="ChannelId" type="xsd:string" />
</Configuration>
<ModuleImplementation Isolation="Any">
<Native>
<ClassID>8DB8C3B0-3AB0-494a-A09B-5F3643CC27A7</ClassID>
</Native>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>
</ModuleTypes>
<MonitorTypes>
<UnitMonitorType ID="Microsoft.Windows.HyperV.DiskFreeSpaceMonitorType" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="FreeSpaceAvailable" NoDetection="false" />
<MonitorTypeState ID="PartialSpaceAvailable" NoDetection="false" />
<MonitorTypeState ID="NoSpaceAvailable" NoDetection="false" />
</MonitorTypeStates>
<Configuration>
<xsd:element minOccurs="1" name="VirtualDriveId" type="xsd:string" />
<xsd:element minOccurs="1" name="WarningSize" type="xsd:int" />
<xsd:element minOccurs="1" name="ErrorSize" type="xsd:int" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="WarningSize" Selector="$Config/WarningSize$" ParameterType="int" />
<OverrideableParameter ID="ErrorSize" Selector="$Config/ErrorSize$" ParameterType="int" />
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="SpaceProvider" TypeID="Microsoft.Windows.HyperV.DiskPartitionSpaceProvider.Subscriber" />
<ConditionDetection ID="EnoughSpaceCheck" TypeID="System!System.ExpressionFilter">
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='$Config/VirtualDriveId$.FreeSpace']</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Integer">$Config/WarningSize$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='$Config/VirtualDriveId$.Monitor']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">false</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</ConditionDetection>
<ConditionDetection ID="PartialSpaceCheck" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='$Config/VirtualDriveId$.FreeSpace']</XPathQuery>
</ValueExpression>
<Operator>LessEqual</Operator>
<ValueExpression>
<Value Type="Integer">$Config/WarningSize$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='$Config/VirtualDriveId$.FreeSpace']</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Integer">$Config/ErrorSize$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='$Config/VirtualDriveId$.Monitor']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="NoSpaceCheck" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='$Config/VirtualDriveId$.FreeSpace']</XPathQuery>
</ValueExpression>
<Operator>LessEqual</Operator>
<ValueExpression>
<Value Type="Integer">$Config/ErrorSize$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='$Config/VirtualDriveId$.Monitor']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="FreeSpaceAvailable">
<Node ID="EnoughSpaceCheck">
<Node ID="SpaceProvider" />
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="PartialSpaceAvailable">
<Node ID="PartialSpaceCheck">
<Node ID="SpaceProvider" />
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="NoSpaceAvailable">
<Node ID="NoSpaceCheck">
<Node ID="SpaceProvider" />
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>
</MonitorTypes>
</TypeDefinitions>
<Monitoring>
<Rules>
</Rules>
<Monitors>
<!--
<AggregateMonitor ID="QND.Hyperv.2012R2.VDisk.Rollup.Monitor" Accessibility="Public" Enabled="true" Target="QND.Hyperv.2012R2.VM"
ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal">
<Category>PerformanceHealth</Category>
<Algorithm>WorstOf</Algorithm>
</AggregateMonitor>
-->
<!-- don't know what it does and if it works -->
<UnitMonitor ID="QND.Windows.HyperV.2012.R2.VirtualDrive.FreeSpaceMonitor" Accessibility="Public" Enabled="onEssentialMonitoring" Target="QND.HyperV.2012R2.VirtualDrive" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="HVLib!Microsoft.Windows.HyperV.DiskFreeSpaceMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<OperationalStates>
<OperationalState ID="EnoughSpace" MonitorTypeStateID="FreeSpaceAvailable" HealthState="Success" />
<OperationalState ID="PartialSpace" MonitorTypeStateID="PartialSpaceAvailable" HealthState="Warning" />
<OperationalState ID="NoSpace" MonitorTypeStateID="NoSpaceAvailable" HealthState="Error" />
</OperationalStates>
<Configuration>
<VirtualDriveId>$Target/Property[Type="QND.HyperV.VMHardwareComponent"]/DeviceId$</VirtualDriveId>
<WarningSize>2048</WarningSize>
<ErrorSize>200</ErrorSize>
</Configuration>
</UnitMonitor>
<UnitMonitor ID="QND.Windows.HyperV.2012.R2.RemoteFxCapableMonitor" Accessibility="Public" Enabled="false" Target="QND.Hyperv.2012R2.VM"
ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="HVMon!Microsoft.Windows.HyperV.2012.R2.RemoteFXMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="QND.Windows.HyperV.2012.R2.RemoteFxCapableMonitor.Alert">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters />
</AlertSettings>
<OperationalStates>
<OperationalState ID="RemoteFXCapableHardware" MonitorTypeStateID="HostHealthy" HealthState="Success" />
<OperationalState ID="RemoteFXInCapableHardware" MonitorTypeStateID="HostCritical" HealthState="Error" />
</OperationalStates>
<Configuration>
<IntervalSeconds>86400</IntervalSeconds>
<TimeoutSeconds>30</TimeoutSeconds>
<PropertyName>RemoteFXCapable</PropertyName>
</Configuration>
</UnitMonitor>
<UnitMonitor ID="QND.Windows.HyperV.2012.R2.HeterogeneousGPUMonitor" Accessibility="Public" Enabled="false" Target="QND.Hyperv.2012R2.VM"
ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="HVMon!Microsoft.Windows.HyperV.2012.R2.RemoteFXMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="QND.Windows.HyperV.2012.R2.HeterogeneousGPUMonitor.Alert">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters />
</AlertSettings>
<OperationalStates>
<OperationalState ID="RemoteFXCapableHardware" MonitorTypeStateID="HostHealthy" HealthState="Success" />
<OperationalState ID="RemoteFXInCapableHardware" MonitorTypeStateID="HostCritical" HealthState="Error" />
</OperationalStates>
<Configuration>
<IntervalSeconds>86400</IntervalSeconds>
<TimeoutSeconds>30</TimeoutSeconds>
<PropertyName>HeterogeneousGPU</PropertyName>
</Configuration>
</UnitMonitor>
<DependencyMonitor ID="QND.Hyperv.2012R2.VDiskToVM.DepMonitor" Accessibility="Public" Enabled="true" MemberMonitor="Health!System.Health.AvailabilityState"
ParentMonitorID="Health!System.Health.AvailabilityState" RelationshipType="QND.Hyperv.2012R2.VMHostsVMHardwareComponent" Remotable="true" Priority="Normal" Target="QND.Hyperv.2012R2.VM">
<Category>AvailabilityHealth</Category>
<Algorithm>WorstOf</Algorithm>
</DependencyMonitor>
</Monitors>
</Monitoring>
<Presentation>
<StringResources>
<StringResource ID="QND.Windows.HyperV.2012.R2.RemoteFxCapableMonitor.Alert" />
<StringResource ID="QND.Windows.HyperV.2012.R2.HeterogeneousGPUMonitor.Alert" />
</StringResources>
</Presentation>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="QND.Windows.HyperV.2012.R2.RemoteFxCapableMonitor.Alert">
<Name>GPUs installed in this server are not RemoteFX capable. Virtual machines that are configured to use the GPU will not start.</Name>
<Description>GPUs installed in this server are not RemoteFX capable. Virtual machines that are configured to use the GPU will not start.</Description>
</DisplayString>
<DisplayString ElementID="QND.Windows.HyperV.2012.R2.HeterogeneousGPUMonitor.Alert">
<Name>GPUs installed in the server are not of the same make and model.</Name>
<Description>The server currently hosts GPUs that are not of the same make and model. This configuration is not valid for RemoteFX. RemoteFX requires that GPUs installed in the server must be of the same make and model.</Description>
</DisplayString>
<DisplayString ElementID="QND.Windows.HyperV.2012.R2.VirtualDrive.FreeSpaceMonitor">
<Name>Free Space</Name>
</DisplayString>
<DisplayString ElementID="QND.Windows.HyperV.2012.R2.RemoteFxCapableMonitor">
<Name>RemoteFX Capable</Name>
</DisplayString>
<DisplayString ElementID="QND.Windows.HyperV.2012.R2.HeterogeneousGPUMonitor">
<Name>Hetherogeneous GPU Capable</Name>
</DisplayString>
<DisplayString ElementID="QND.Hyperv.2012R2.VDiskToVM.DepMonitor">
<Name>Virtual Disks</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPackFragment>