Source code of Windows XP (NT5)
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.

820 lines
92 KiB

  1. ��////////////////////////////////////////////////////////////////////////////////
  2. // HealthMon.Mof
  3. // Copyright (c)2000 Microsoft Corporation, All Rights Reserved
  4. //
  5. //qualifier Values: amended;
  6. qualifier Description: amended ToSubClass;
  7. qualifier DisplayName: amended ToSubClass;
  8. #pragma autorecover
  9. #pragma namespace("\\\\.\\root\\cimv2")
  10. //******************************************************************************
  11. // *** Namespace Section ***
  12. // Create MicrosoftHealthMonitor Namespace
  13. //******************************************************************************
  14. //
  15. instance of __NAMESPACE
  16. {
  17. Name = "MicrosoftHealthMonitor";
  18. };
  19. #pragma namespace("MicrosoftHealthMonitor")
  20. /////////////////////////////////////////////////////////////////////////////////////////////
  21. // class MicrosoftHM_Version
  22. /////////////////////////////////////////////////////////////////////////////////////////////
  23. [singleton, description("Health Monitor Version class.")] class MicrosoftHM_Version
  24. {
  25. [read]
  26. string MajorVersion;
  27. [read]
  28. string MinorVersion;
  29. [read]
  30. string BuildVersion;
  31. [read]
  32. string HotfixVersion;
  33. };
  34. instance of MicrosoftHM_Version
  35. {
  36. MajorVersion = "2";
  37. MinorVersion = "10";
  38. BuildVersion = "$$$@";
  39. HotfixVersion = "!!!@";
  40. };
  41. //******************************************************************************
  42. //******************************************************************************
  43. //******************************************************************************
  44. // PROVIDER REGISTRATION SECTION
  45. // The Health Monitor agent acts as an Instance, event and method provider. It is
  46. // also a consumer provider.
  47. //******************************************************************************
  48. //******************************************************************************
  49. //******************************************************************************
  50. ////////////////////////////////////////////////////////////////////////////////////////////
  51. // Instance Provider
  52. ////////////////////////////////////////////////////////////////////////////////////////////
  53. instance of __Win32Provider
  54. {
  55. Name = "MicrosoftHM_InstProvider";
  56. CLSID = "{68AC0D34-DB09-11d2-8F56-006097919914}";
  57. };
  58. // registration
  59. instance of __InstanceProviderRegistration
  60. {
  61. Provider = "__Win32Provider=\"MicrosoftHM_InstProvider\"";
  62. SupportsPut = FALSE;
  63. SupportsGet = TRUE;
  64. SupportsDelete = FALSE;
  65. SupportsEnumeration = TRUE;
  66. QuerySupportLevels = {"WQL:UnarySelect"};
  67. };
  68. ////////////////////////////////////////////////////////////////////////////////////////////
  69. // Method Provider
  70. ////////////////////////////////////////////////////////////////////////////////////////////
  71. //instance of __Win32Provider as $P
  72. instance of __Win32Provider
  73. {
  74. Name = "MicrosoftHM_MethProvider";
  75. CLSID = "{68AC0D41-DB09-11d2-8F56-006097919914}";
  76. };
  77. instance of __MethodProviderRegistration
  78. {
  79. Provider = "__Win32Provider=\"MicrosoftHM_MethProvider\"";
  80. };
  81. ////////////////////////////////////////////////////////////////////////////////////////////
  82. // Base Classes
  83. ////////////////////////////////////////////////////////////////////////////////////////////
  84. [description("Health Monitor Context class. Used to pass context to a Data Collector, and for arguments to a Method.")] class MicrosoftHM_Context
  85. {
  86. [key] string Name;
  87. [values {"CIM_SINT8","CIM_UINT8","CIM_SINT16","CIM_UINT16","CIM_SINT32","CIM_UINT32","CIM_SINT64","CIM_UINT64","CIM_REAL32","CIM_REAL64","CIM_BOOLEAN","CIM_STRING","CIM_DATETIME", "CIM_CHAR16"},valuemap {"16","17","2","18","3","19","20","21","4","5","11","8","101","103"}] uint32 Type;
  88. string Value;
  89. };
  90. [abstract, description("Health Monitor Base Configuration class.")] class MicrosoftHM_Configuration
  91. {
  92. [key, DisplayName("Unique identifier"), description("Unique identifier (a 128-bit GUID) generated by the console for this configuration item. This is the key property.")] string GUID;
  93. [DisplayName("Is Enabled"),description("Indicates whether this configuraiton item is enabled (=True) or disabled (=False). Disabled items, and their children, will not collect data nor fire actions.")] boolean Enabled = TRUE;
  94. [DisplayName("Is Hidden"),description("Indicates that instances should not be shown in a console application. For external tool usage. Not currently used by the console, or agent.")] boolean Hidden = FALSE;
  95. [DisplayName("Name"), Description("Name given by the user to describe this configuration item.")] string Name;
  96. [DisplayName("Auto-Assign Names"), Description("Determines whether the console will automatically assign a name to a configuration item based on its content. For example, a new HTTP data collector will be named after the URL it is monitoring. In Health Monitor 2.1, this property is reserved for future use.")] boolean AutoName = true;
  97. [DisplayName("Description"), Description("Long description given by the user describing the use of this configuration item.")] string Description;
  98. };
  99. [abstract, DisplayName("Base Status"), description("Health Monitor Base Status")] class MicrosoftHM_BaseStatus
  100. {
  101. [DisplayName("System Name"), description("Name of the computer system.")] string SystemName;
  102. [DisplayName("Local Time"), description("Local time of the Agent Machine. In WMI datetime format (GMT).")] datetime TimeGeneratedGMT;
  103. [DisplayName("Formatted Local Time"), description("Local time of the Agent Machine. The format is that of the system locale of the agent machine.")] string LocalTimeFormatted;
  104. [DisplayName("Name"), Description("Name given by the user to describe the configuration item that this status item corresponds to.")] string Name;
  105. [DisplayName("Parent GUID"), description("GUID of the Parent")] String ParentGUID;
  106. [DisplayName("Status GUID"), description("Unique for the current status change.")] string StatusGUID;
  107. };
  108. [DisplayName("Base Status Event"), description("Health Monitor Base Status Event")] class MicrosoftHM_BaseStatusEvent : __ExtrinsicEvent
  109. {
  110. [DisplayName("System Name"), description("Name of the system.")] string SystemName;
  111. [DisplayName("Local Time"), description("Local time of the Agent Machine. In WMI datetime format (GMT).")] datetime TimeGeneratedGMT;
  112. [DisplayName("Formatted Local Time"), description("Local time of the Agent Machine. The format is that of the system locale of the agent machine.")] string LocalTimeFormatted;
  113. [DisplayName("Name"), Description("Name given by the user to describe the configuration item that this status item corresponds to.")] string Name;
  114. [DisplayName("Parent GUID"), description("GUID of the Parent")] String ParentGUID;
  115. [DisplayName("Status GUID"), description("Unique for the current status change.")] string StatusGUID;
  116. };
  117. [abstract, DisplayName("Status for Configuration Items"), description("Base class for all status instances representing Health Monitor systems, data groups, data collectors, and thresholds")] class MicrosoftHM_Status : MicrosoftHM_BaseStatus
  118. {
  119. [key, DisplayName("GUID"), description("Unique identifier")] string GUID;
  120. [values {"GOOD","COLLECTING","RESET","RESERVED3","DISABLED","SCHEDULEDOUT","RESERVED6","RESERVED7","WARNING","CRITICAL"}, DisplayName("State"), description("The state represented by this status item. 0=Good, 1=Collecting, 2=Reset, 4=Disabled, 5=Scheduled Outage, 8=Warning, 9=Critical")] uint32 State;
  121. [DisplayName("Message"), description("Message indicating status of the HealthMon item. Can contain information about the results of a data collection, about misconfiguration of the item, or about results of actions.")] string Message;
  122. };
  123. [abstract, DisplayName("Per-Instance Status"), description("Base class representing status of individual instances")] class MicrosoftHM_PerInstanceStatus : MicrosoftHM_BaseStatus
  124. {
  125. [key, DisplayName("GUID"), description("Unique identifier")] string GUID;
  126. [key, DisplayName("Instance Name"), description("Instance name is applicable (e.g. C: drive).")] string InstanceName;
  127. [values {"GOOD","COLLECTING","RESET","RESERVED3","DISABLED","SCHEDULEDOUT","RESERVED6","RESERVED7","WARNING","CRITICAL"}, DisplayName("State"), description("The state represented by this status item. 0=Good, 1=Collecting, 2=Reset, 4=Disabled, 5=Scheduled Outage, 8=Warning, 9=Critical")] uint32 State;
  128. [DisplayName("Message"), description("Message indicating status of the HealthMon item. Can contain information about the results of a data collection, about misconfiguration of the item, or about results of actions.")] string Message;
  129. };
  130. [abstract, DisplayName("Per-Property Status"), description("Base class used to track statistics and other per-property items")] class MicrosoftHM_PerPropertyStatus : MicrosoftHM_BaseStatus
  131. {
  132. [key, DisplayName("GUID"), description("Unique identifier")] string GUID;
  133. [key, DisplayName("Instance Name"), description("Instance name is applicable (e.g. C: drive).")] string InstanceName;
  134. [key, DisplayName("Property Name"), description("Property name that the data is for.")] string PropertyName;
  135. };
  136. [DisplayName("Status Event"), description("Base class for status events sent when Health Monitor systems, data groups, data collectors, and thresholds change state")] class MicrosoftHM_StatusEvent : MicrosoftHM_BaseStatusEvent
  137. {
  138. [key, DisplayName("GUID"), description("Unique identifier")] string GUID;
  139. [values {"GOOD","COLLECTING","RESET","RESERVED3","DISABLED","SCHEDULEDOUT","RESERVED6","RESERVED7","WARNING","CRITICAL"}, DisplayName("State"), description("The state represented by this status item. 0=Good, 1=Collecting, 2=Reset, 4=Disabled, 5=Scheduled Outage, 8=Warning, 9=Critical")] uint32 State;
  140. [DisplayName("Message"), description("Message indicating status of the HealthMon item. Can contain information about the results of a data collection, about misconfiguration of the item, or about results of actions.")] string Message;
  141. };
  142. [DisplayName("Per-Instance Status Event"), description("Base class for status events sent when of individual instances change state")] class MicrosoftHM_PerInstanceStatusEvent : MicrosoftHM_BaseStatusEvent
  143. {
  144. [key, DisplayName("GUID"), description("Unique identifier")] string GUID;
  145. [key, DisplayName("Instance Name"), description("Instance name is applicable (e.g. C: drive).")] string InstanceName;
  146. [values {"GOOD","COLLECTING","RESET","RESERVED3","DISABLED","SCHEDULEDOUT","RESERVED6","RESERVED7","WARNING","CRITICAL"}, DisplayName("State"), description("The state represented by this status item. 0=Good, 1=Collecting, 2=Reset, 4=Disabled, 5=Scheduled Outage, 8=Warning, 9=Critical")] uint32 State;
  147. [DisplayName("Message"), description("Message indicating status of the HealthMon item. Can contain information about the results of a data collection, about misconfiguration of the item, or about results of actions.")] string Message;
  148. };
  149. [Association : ToInstance] class MicrosoftHM_ConfigurationAssociation
  150. {
  151. [key] MicrosoftHM_Configuration ref ParentPath;
  152. [key] MicrosoftHM_Configuration ref ChildPath;
  153. };
  154. // Can Associate the same Action to more than one Object!!!
  155. [Association : ToInstance, DisplayName("Action-to-Configuration Association"), description("Associates a Configuration to an Action.")] class MicrosoftHM_ConfigurationActionAssociation : MicrosoftHM_ConfigurationAssociation
  156. {
  157. [DisplayName("Reminder Time"), description("How many seconds between firing off the action if we are still in the critical, or warning state.")] uint32 ReminderTime = 0;
  158. [not_null] string Query = "";
  159. __EventFilter ref EventFilter;
  160. };
  161. //******************************************************************************
  162. //******************************************************************************
  163. //******************************************************************************
  164. // CONFIGURATION CLASS DECLARATION SECTION
  165. // Classes dealing with the configuration of the Agent
  166. //******************************************************************************
  167. //******************************************************************************
  168. //******************************************************************************
  169. // The heirarchy of classes and how they interrelate, can be illustrated with
  170. // the following diagram example. The sections that follow specify the classes
  171. // and associations that are used.
  172. //
  173. // - MicrosoftHM_System
  174. // |
  175. // |--MyDataGroup MicrosoftHM_DataGroup (convenient grouping the user likes)
  176. // | |
  177. // | |--Processor MicrosoftHM_DataGroup (Grouping for processor related data)
  178. // | | |
  179. // | | |--%ProcessorTime MicrosoftHM_DataCollector (Collect the processor time perf counter)
  180. // | | |
  181. // | | |--Warning MicrosoftHM_Threshold (If CurrentValue > 70 for 300 sec)
  182. // | | |
  183. // | | |--Critical MicrosoftHM_Threshold (If CurrentValue > 90 for 300 sec)
  184. // | | |
  185. // | | |--PageEric MicrosoftHM_Action (If 9am to 5pm)
  186. // | | |
  187. // | | |--PageGreg MicrosoftHM_Action (If 5pm to 9am)
  188. // | |
  189. // | |--LogicalDisk MicrosoftHM_DataGroup
  190. // | |
  191. // | |--%FreeSpace MicrosoftHM_DataCollector
  192. // | |
  193. // | |--%FreeMegabytes MicrosoftHM_DataCollector
  194. // |
  195. // |--ExchangeServer MicrosoftHM_DataGroup
  196. // |
  197. // |--WorkQueueLength MicrosoftHM_DataCollector
  198. ////////////////////////////////////////////////////////////////////////////////
  199. // System class
  200. // A singleton class, main purpose is to allow quick disabling of agent, and
  201. // specifying a startup delay for the agent.
  202. // Can't have a Singletone class with a key property
  203. [provider("MicrosoftHM_MethProvider"), DisplayName("System Configuration"), description("System class. Acts as a container for Data Groups. All Methods reside in this class. There is only one instance, with GUID=\"{@}\" as the key.")] class MicrosoftHM_SystemConfiguration : MicrosoftHM_Configuration
  204. {
  205. //[description("What account to use for WMI connections.")]
  206. // String ConnectionAccount;
  207. [DisplayName("Startup Delay Time"), description("How many seconds after WMI startup that Threshold evaluation begins.")] uint32 StartupDelayTime = 0;
  208. [DisplayName("Max Instances Per Data Collector"), description("How instances to accept before returning an error in the multi-instance case.")] uint32 MaxInstancesPerDataCollector = 40;
  209. [DisplayName("Delete"), Implemented, static] uint32 Delete (
  210. [in, description("Identifier of what to delete.")] String TargetGUID
  211. );
  212. [DisplayName("Reset Data Collector State, and perform collection and evaluation"), Implemented, static] uint32 ResetAndCheckNow(
  213. [in, description("Identifier of what to reset. Can be a Data Group")] String TargetGUID
  214. );
  215. [DisplayName("Copy"), Implemented, static] uint32 Copy(
  216. [in, description("Identifier of what to copy (includes all of the underlying hierarcy and associations).")]
  217. String TargetGUID,
  218. [out, description("System we are coming from")]
  219. String OriginalSystem,
  220. [out, description("Parent we are coming from")]
  221. String OriginalParentGUID,
  222. [out, description("Objects to do Paste with")]
  223. MicrosoftHM_Configuration Instances[]
  224. );
  225. [DisplayName("Paste"), Implemented, static, values {"OK","ERROR","NAME_CONFLICT"}, description("Similar to Windows Explorer functionality. 1 = An Error occurred in the paste operation. 2 = There was an existing child at the same level with the same name, and ForceReplace was set to FALSE.")] uint32 Paste(
  226. [in, description("Where to copy it to")]
  227. String TargetGUID,
  228. [in, description("How to proceed.")]
  229. boolean ForceReplace,
  230. [in, description("System we came from")]
  231. String OriginalSystem,
  232. [in, description("Parent we came from")]
  233. String OriginalParentGUID,
  234. [in, description("Objects to do Paste with")]
  235. MicrosoftHM_Configuration Instances[]
  236. );
  237. [DisplayName("Move"), Description("Use only for objects to be moved on the same machine."), Implemented, static] uint32 Move(
  238. [in, description("Identifier of what to move (includes all of the underlying hierarcy and associations).")]
  239. String TargetGUID,
  240. [in, description("Where to move it under")]
  241. String TargetParentGUID
  242. );
  243. [DisplayName("Delete Configuration Action Association"), Implemented, static] uint32 DeleteConfigurationActionAssociation(
  244. [in, description("Config GUID")]
  245. String TargetGUID,
  246. [in, description("Action GUID")]
  247. String ActionGUID
  248. );
  249. [DisplayName("Message"), description("What gets sent in the Event. Can contain special embedded tags such as %Name% and %State% that then get substituted for. Can be any property found in the SystemStatus class.")] string Message = "Computer %SystemName%: %State% condition.";
  250. [DisplayName("Reset Message"), description("What gets sent when we return to normal.")] string ResetMessage = "%SystemName% is Ok.";
  251. };
  252. ////////////////////////////////////////////////////////////////////////////////
  253. // MicrosoftHM_DataGroup class - This is used to group Data Collectors together. It acts like a folder.
  254. // We do allow nested MicrosoftHM_DataGroups.
  255. [description("Health Monitor MicrosoftHM_DataGroup class. Acts as a container for Data Collectors and nested Data Groups.")] class MicrosoftHM_DataGroupConfiguration : MicrosoftHM_Configuration
  256. {
  257. [DisplayName("Message"), description("What gets sent in the Event. Can contain special embedded tags such as %Name% and %State% that then get substituted for. Can be any property found in the DataGroupStatus class.")] string Message = "%Name% : %State% condition";
  258. [DisplayName("Reset Message"), description("What gets sent when we return to normal.")] string ResetMessage = "%Name% is Ok.";
  259. };
  260. ////////////////////////////////////////////////////////////////////////////////
  261. // MicrosoftHM_DataCollector class - This is the class used for a single WMI instance collection.
  262. // Where the Data Collector collects the instance from WMI the Threshold tests against
  263. // this data. This is the abstract base class, with several classes of use derived from it.
  264. [abstract, DisplayName("Data Collector Configuration"), description("Health Monitor Data Collector class. This class acts as the collector of WMI instances via queries or polling. Thresholds can be associated to this to perform evaluations against what was collected.")] class MicrosoftHM_DataCollectorConfiguration : MicrosoftHM_Configuration
  265. {
  266. [DisplayName("Target Namespace"), description("The complete path to the instance to collect. The path may contain a remote machine name")] string TargetNamespace;
  267. [DisplayName("Context"), description("Gets passed on as provider specific information.")] MicrosoftHM_Context Context[];
  268. [DisplayName("Local"), description("Local to use (e.g. for US English \"ms_409\". Leave NULL to default to system setting")] string Local = NULL;
  269. [DisplayName("Collection Interval Multiple"), description("How often to sample. How often this Data Collector runs in relation to the base system interval (1 second). E.G. 60 = 60 seconds. The WMI instance is collected at each interval. Threshold also gets evaluated at this time. Statistics get sent out at this time. EXCEPTION: For Event based Data Collector, we don't collect, events come in instead. It still needs to be set to something, as that is still when the threshold gets evaluated.")] uint32 CollectionIntervalMsecs = 60000;
  270. [DisplayName("Collection Time Out"), description("The amount of time allowed for a reply. The Data Collector will return an error state if a reply is not received in this amount of time (in seconds). This does not apply to event based data elements. A setting of zero means it must return before the next collection interval.")] uint32 CollectionTimeOut = 300;
  271. [DisplayName("Statistics Window Size"), description("Number of collection intervals to calculate the statistics across.")] uint32 StatisticsWindowSize = 6;
  272. [DisplayName("Active Days"), description("Days of the week it is active. One bit per day. For example, 00000000=No days. 00000001=Sunday only. 00000010=Monday only. 00111110=Monday through Friday.")] uint8 ActiveDays = 01111111B;
  273. [DisplayName("Begin Time"), description("hh = Two-digit hour of the day using the 24-hour clock (00 through 23). mm = Two-digit minute in the hour (00 through 59). If NULL it will always be active. ********0600**.******+*** would be 6am.")] datetime BeginTime = NULL;
  274. [DisplayName("End Time"), description("hh = Two-digit hour of the day using the 24-hour clock (00 through 23). mm = Two-digit minute in the hour (00 through 59). If NULL it will always be active. ********2300**.******+*** would be 11pm.")] datetime EndTime = NULL;
  275. [DisplayName("Type GUID"), description("For use by the console to aid in the display")] string TypeGUID;
  276. [DisplayName("Require Reset"), description("May not want to automatically reset to the good state, but require the user to acknowledge the fault. Can call Reset method to RESET, or have a threshold that forces RESET.")] boolean RequireReset = FALSE;
  277. [DisplayName("Properties"), description("What properties to collect statistics on.")] string Properties[];
  278. [DisplayName("Message"), description("What gets sent in the Alert Event. Can contain special embedded tags such as %CurrentValue% that then get substituted for. Can be any property found in the DataCollectorStatus class.")] string Message = "%Name% : %State% condition";
  279. [DisplayName("Reset Message"), description("What gets sent when we return to normal.")] string ResetMessage = "%Name% is Ok.";
  280. };
  281. [description("Derived Data Element that collects its data by using a path at a poling interval.")] class MicrosoftHM_PolledGetObjectDataCollectorConfiguration : MicrosoftHM_DataCollectorConfiguration
  282. {
  283. [DisplayName("Object Path"), description("Specifies what data to get .e.g. Win32_SystemDriver.Name=\"DiskPerf\".")] string ObjectPath;
  284. };
  285. [description("Derived Data Element that collects its data by using a method at a poling interval.")] class MicrosoftHM_PolledMethodDataCollectorConfiguration : MicrosoftHM_DataCollectorConfiguration
  286. {
  287. [DisplayName("Object Path"), description("Specifies the class name or instance.")] string ObjectPath;
  288. [DisplayName("Method Name"), description("Method to call e.g. Microsoft_InternetProtocolExecution.Execute.")] string MethodName;
  289. [DisplayName("Arguments"), description("Arguments to the method.")] MicrosoftHM_Context Arguments[];
  290. };
  291. [description("Derived Data Element that collects its data by using a query at a poling interval.")] class MicrosoftHM_PolledQueryDataCollectorConfiguration : MicrosoftHM_DataCollectorConfiguration
  292. {
  293. [DisplayName("Query"), description("E.g. select * from Win32_Process where name=\"outlook.exe\".")] string Query;
  294. };
  295. [description("Derived Data Element that collects its data by registering an event notification query.")] class MicrosoftHM_EventQueryDataCollectorConfiguration : MicrosoftHM_DataCollectorConfiguration
  296. {
  297. [DisplayName("Query"), description("E.g. select * from SomeEvent.")] string Query;
  298. };
  299. ////////////////////////////////////////////////////////////////////////////////
  300. // MicrosoftHM_Threshold class - This specifies how to Threshold against the value that
  301. // comes from the MicrosoftHM_DataCollector instance. There can be more than one Threshold
  302. // looking at a single MicrosoftHM_DataCollector. The values are evaluated at each collection
  303. // interval as specified in the MicrosoftHM_DataCollector.
  304. [description("Health Monitor Threshold class. Is associated to a Data Element to run evaluations against what the Data Element has collected.")] class MicrosoftHM_ThresholdConfiguration : MicrosoftHM_Configuration
  305. {
  306. [DisplayName("Property Name"), description("What property to threshold against. As a special case you can place the string CollectionInstanceCount here to threshold against how many instances were returned. (In the case of event based, how many in the window)")] string PropertyName;
  307. [DisplayName("Use Flag"), values {"NONE","AVERAGE","DIFFERENCE"}, description("0 = Thresholds against current value. 1 = Thresholds against the average value, not the current value. Does not apply to strings. 2 = Threshold against the change, not the current value. e.g. Difference in VALUE from one poll to the next. Doesn't apply to strings.")] uint32 UseFlag = 0;
  308. [DisplayName("Test Condition"), values {"<",">","=","!=",">=","<=","contains","!contains","always"}, description("The condition to use for the Threshold.")] uint32 TestCondition = 3; // test for equality. This is a good default because it works for strings, boolean, and numeric
  309. [DisplayName("Compare Value"), description("Value to use for Threshold. Can represent any WMI datatype. It will be converted depending on the property type it is being used with in the Data Collector.")] string CompareValue;
  310. [DisplayName("Threshold Duration"), description("How long the value must remain. In number of collection intervals. Set to zero for instantaneous.")] uint32 ThresholdDuration = 0;
  311. [DisplayName("State"), values {"GOOD","COLLECTING","RESET","RESERVED3","DISABLED","SCHEDULEDOUT","RESERVED6","RESERVED7","WARNING","CRITICAL"}, description("The state we transition to if Threshold is crossed. RESET means that the Data Collector is reset if threshold is crossed.")] uint32 State = 0;
  312. [DisplayName("Creation Date"), description("Time of the original creation.")] datetime CreationDate;
  313. [DisplayName("Last Update"), description("Time of the last change.")] datetime LastUpdate;
  314. };
  315. ////////////////////////////////////////////////////////////////////////////////
  316. // MicrosoftHM_ActionConfiguration class - This specifies an action to take place that can be associated
  317. // with a Threshold.
  318. [description("Health Monitor Action class. Performs some type of action as a result of seeing an event from one of the Configuration class Status messages.")] class MicrosoftHM_ActionConfiguration : MicrosoftHM_Configuration
  319. {
  320. [DisplayName("Active Days"), description("Days of the week it is active. One bit per day. For example, 00000000=No days. 00000001=Sunday only. 00000010=Monday only. 00111110=Monday through Friday.")] uint8 ActiveDays = 01111111B;
  321. [DisplayName("Begin Time"), description("hh = Two-digit hour of the day using the 24-hour clock (00 through 23). mm = Two-digit minute in the hour (00 through 59). If NULL it will always be active. ********0600**.******+*** would be 6am.")] datetime BeginTime = NULL;
  322. [DisplayName("End Time"), description("hh = Two-digit hour of the day using the 24-hour clock (00 through 23). mm = Two-digit minute in the hour (00 through 59). If NULL it will always be active. ********2300**.******+*** would be 11pm.")] datetime EndTime = NULL;
  323. [DisplayName("Type GUID"), description("For use by the console to aid in the display")] string TypeGUID;
  324. [DisplayName("Event Consumer"), description("")] __EventConsumer ref EventConsumer;
  325. };
  326. //******************************************************************************
  327. //******************************************************************************
  328. //******************************************************************************
  329. // STATUS CLASSES
  330. // Classes dealing with information and events produced by the Agent
  331. //******************************************************************************
  332. //******************************************************************************
  333. //******************************************************************************
  334. ////////////////////////////////////////////////////////////////////////////////
  335. // MicrosoftHM_SystemStatus classes
  336. // This is a rollup status for the entire hierarchy of monitors on this system.
  337. // The agent is both an instance and event provider for this information, so that consumers
  338. // can poll or receive events to get the current state of the system. This is also true for
  339. // the Data Group, Data Collector, Threshold, and Action status classes
  340. [dynamic, provider("MicrosoftHM_InstProvider"), description("System Status Instance Class")] class MicrosoftHM_SystemStatus : MicrosoftHM_Status
  341. {
  342. };
  343. [dynamic, description("System Status Event Class")] class MicrosoftHM_SystemStatusEvent : MicrosoftHM_StatusEvent
  344. {
  345. };
  346. ////////////////////////////////////////////////////////////////////////////////
  347. // MicrosoftHM_DataGroupStatus classes
  348. [dynamic, provider("MicrosoftHM_InstProvider"),description("Data Group Status"),DisplayName("Data Group Status")] class MicrosoftHM_DataGroupStatus : MicrosoftHM_Status
  349. {
  350. };
  351. [dynamic, DisplayName("Data Group Status Event"), description("Data Group Status Event Class")] class MicrosoftHM_DataGroupStatusEvent : MicrosoftHM_StatusEvent
  352. {
  353. };
  354. ////////////////////////////////////////////////////////////////////////////////
  355. // MicrosoftHM_DataCollectorStatus classes
  356. [dynamic, provider("MicrosoftHM_InstProvider"), DisplayName("Data Collector Status"), description("Data Collector Status")] class MicrosoftHM_DataCollectorStatus : MicrosoftHM_Status
  357. {
  358. [DisplayName("Error Code (from WMI)"), description("Contains a zero if there has been no error for the current collection. If there has been an error, it contains the code, in the case of a direct error from WMI, we place the WMI HRESULT here.")] uint32 CollectionErrorCode;
  359. [DisplayName("Error Description (from WMI)"), description("Is empty if there has been no error for the current collection. If there has been an error, it contains error text, in the case of a direct error from WMI, we place the text directly from WMI.")] string CollectionErrorDescription;
  360. [DisplayName("# of Instances Collected"), description("For polled - number of instances returned. For event - how many events were received in the sampling window. See the WindowSize property of the Data Collector.")] uint32 CollectionInstanceCount;
  361. };
  362. [dynamic, DisplayName("Data Collector Status Event"), description("Data Collector Status Event")] class MicrosoftHM_DataCollectorStatusEvent : MicrosoftHM_StatusEvent
  363. {
  364. [DisplayName("Error Code (from WMI)"), description("Contains a zero if there has been no error for the current collection. If there has been an error, it contains the code, in the case of a direct error from WMI, we place the WMI HRESULT here.")] uint32 CollectionErrorCode;
  365. [DisplayName("Error Description (from WMI)"), description("Is empty if there has been no error for the current collection. If there has been an error, it contains error text, in the case of a direct error from WMI, we place the text directly from WMI.")] string CollectionErrorDescription;
  366. [DisplayName("# of Instances Collected"), description("For polled - number of instances returned. For event - how many events were received in the sampling window. See the WindowSize property of the Data Collector.")] uint32 CollectionInstanceCount;
  367. };
  368. ////////////////////////////////////////////////////////////////////////////////
  369. // MicrosoftHM_DataCollectorPerInstanceStatus classes
  370. // These classes represent individual instances collected by a data collector. They are used
  371. // because a single data collector, say for Logical Disk, can collect multiple disks and those
  372. // individual states need to be differentiated
  373. [dynamic, provider("MicrosoftHM_InstProvider"),DisplayName("Data Collector Per-Instance Status"), description("Status of each instance monitored by a data collector")] class MicrosoftHM_DataCollectorPerInstanceStatus : MicrosoftHM_PerInstanceStatus
  374. {
  375. [DisplayName("Error Code (from WMI)"), description("Contains a zero if there has been no error for the current collection. If there has been an error, it contains the code, in the case of a direct error from WMI, we place the WMI HRESULT here.")] uint32 CollectionErrorCode;
  376. [DisplayName("Error Description (from WMI)"), description("Is empty if there has been no error for the current collection. If there has been an error, it contains error text, in the case of a direct error from WMI, we place the text directly from WMI.")] string CollectionErrorDescription;
  377. [DisplayName("# of Instances Collected"), description("For polled - number of instances returned. For event - how many events were received in the sampling window. See the WindowSize property of the Data Collector.")] uint32 CollectionInstanceCount;
  378. [DisplayName("Embedded Collected Instance"), description("The actual instance collected in the Data Collector.")] Object EmbeddedCollectedInstance;
  379. };
  380. [dynamic, DisplayName("Data Collector Per-Instance Status Event"), description("Event sent for status of each instance monitored by a data collector")] class MicrosoftHM_DataCollectorPerInstanceStatusEvent : MicrosoftHM_PerInstanceStatusEvent
  381. {
  382. [DisplayName("Error Code (from WMI)"), description("Contains a zero if there has been no error for the current collection. If there has been an error, it contains the code, in the case of a direct error from WMI, we place the WMI HRESULT here.")] uint32 CollectionErrorCode;
  383. [DisplayName("Error Description (from WMI)"), description("Is empty if there has been no error for the current collection. If there has been an error, it contains error text, in the case of a direct error from WMI, we place the text directly from WMI.")] string CollectionErrorDescription;
  384. [DisplayName("# of Instances Collected"), description("For polled - number of instances returned. For event - how many events were received in the sampling window. See the WindowSize property of the Data Collector.")] uint32 CollectionInstanceCount;
  385. [DisplayName("Embedded Collected Instance"), description("The actual instance collected in the Data Collector.")] Object EmbeddedCollectedInstance;
  386. };
  387. [dynamic, provider("MicrosoftHM_InstProvider"),DisplayName("Data Collector Statistics"), description("Class to track per-property statistics on data collector properties gathered by the agent")] class MicrosoftHM_DataCollectorStatistics : MicrosoftHM_PerPropertyStatus
  388. {
  389. [DisplayName("Current Value"), description("Current value of the tracked property.")] string CurrentValue;
  390. [DisplayName("Min Value"), description("Min value in the window. Will be NULL if the property being tracked is not numeric.")] string MinValue;
  391. [DisplayName("Max Value"), description("Max value in the window. Will be NULL if the property being tracked is not numeric.")] string MaxValue;
  392. [DisplayName("Avg Value"), description("Avg value in the window. Will be NULL if the property being tracked is not numeric.")] string AvgValue;
  393. };
  394. ////////////////////////////////////////////////////////////////////////////////
  395. // MicrosoftHM_ThresholdStatus classes
  396. // An MicrosoftHM_ThresholdStatusEvent is produced when a Threshold is crossed, and contains all the
  397. // information pertaining to the circumstances surrounding the crossing.
  398. // The information comes from the both the MicrosoftHM_DataCollector and the MicrosoftHM_Threshold.
  399. [dynamic, provider("MicrosoftHM_InstProvider"),description("Threshold Status Instance Class")] class MicrosoftHM_ThresholdStatus : MicrosoftHM_Status
  400. {
  401. };
  402. [dynamic, description("Threshold Status Event Class")] class MicrosoftHM_ThresholdStatusEvent : MicrosoftHM_StatusEvent
  403. {
  404. };
  405. ////////////////////////////////////////////////////////////////////////////////
  406. // MicrosoftHM_ActionStatus classes
  407. // This class is used to track the success or failure of firing actions.
  408. [dynamic, provider("MicrosoftHM_InstProvider"),description("State of an action. If an action fails to fire correctly, it is put in the Critical state. If it fires correctly, it is put in the Good state.")] class MicrosoftHM_ActionStatus : MicrosoftHM_Status
  409. {
  410. };
  411. [dynamic, description("Action Status Event Class")] class MicrosoftHM_ActionStatusEvent : MicrosoftHM_StatusEvent
  412. {
  413. };
  414. [dynamic, description("Action Status Event Class")] class MicrosoftHM_ActionTriggerEvent : MicrosoftHM_StatusEvent
  415. {
  416. [DisplayName("Embedded Status"), description("The Health Monitor status instance that is triggering the action.")] MicrosoftHM_StatusEvent EmbeddedStatusEvent;
  417. };
  418. ////////////////////////////////////////////////////////////////////////////////////////////
  419. // Event Provider
  420. ////////////////////////////////////////////////////////////////////////////////////////////
  421. instance of __Win32Provider
  422. {
  423. Name = "MicrosoftHM_SystemEventProvider";
  424. CLSID = "{68AC0D36-DB09-11d2-8F56-006097919914}";
  425. DefaultMachineName = NULL;
  426. ClientLoadableCLSID = NULL;
  427. ImpersonationLevel = 0;
  428. PerUserInitialization = FALSE;
  429. //XXX Pure = TRUE;
  430. Pure = FALSE;
  431. UnloadTimeout = NULL;
  432. };
  433. instance of __Win32Provider
  434. {
  435. Name = "MicrosoftHM_DataGroupEventProvider";
  436. CLSID = "{68AC0D37-DB09-11d2-8F56-006097919914}";
  437. DefaultMachineName = NULL;
  438. ClientLoadableCLSID = NULL;
  439. ImpersonationLevel = 0;
  440. PerUserInitialization = FALSE;
  441. Pure = FALSE;
  442. UnloadTimeout = NULL;
  443. };
  444. instance of __Win32Provider
  445. {
  446. Name = "MicrosoftHM_DataCollectorEventProvider";
  447. CLSID = "{68AC0D38-DB09-11d2-8F56-006097919914}";
  448. DefaultMachineName = NULL;
  449. ClientLoadableCLSID = NULL;
  450. ImpersonationLevel = 0;
  451. PerUserInitialization = FALSE;
  452. Pure = FALSE;
  453. UnloadTimeout = NULL;
  454. };
  455. instance of __Win32Provider
  456. {
  457. Name = "MicrosoftHM_DataCollectorPerInstanceEventProvider";
  458. CLSID = "{3A7A82DC-8D5C-4ab7-801B-A1C7D30089C6}";
  459. DefaultMachineName = NULL;
  460. ClientLoadableCLSID = NULL;
  461. ImpersonationLevel = 0;
  462. PerUserInitialization = FALSE;
  463. Pure = FALSE;
  464. UnloadTimeout = NULL;
  465. };
  466. instance of __Win32Provider
  467. {
  468. Name = "MicrosoftHM_ThresholdEventProvider";
  469. CLSID = "{68AC0D39-DB09-11d2-8F56-006097919914}";
  470. DefaultMachineName = NULL;
  471. ClientLoadableCLSID = NULL;
  472. ImpersonationLevel = 0;
  473. PerUserInitialization = FALSE;
  474. Pure = FALSE;
  475. UnloadTimeout = NULL;
  476. };
  477. //instance of __Win32Provider
  478. //{
  479. // Name = "MicrosoftHM_ThresholdInstanceEventProvider";
  480. // CLSID = "{68AC0D42-DB09-11d2-8F56-006097919914}";
  481. // DefaultMachineName = NULL;
  482. // ClientLoadableCLSID = NULL;
  483. // ImpersonationLevel = 0;
  484. // PerUserInitialization = FALSE;
  485. // Pure = FALSE;
  486. // UnloadTimeout = NULL;
  487. //};
  488. instance of __Win32Provider
  489. {
  490. Name = "MicrosoftHM_ActionEventProvider";
  491. CLSID = "{68AC0D43-DB09-11d2-8F56-006097919914}";
  492. DefaultMachineName = NULL;
  493. ClientLoadableCLSID = NULL;
  494. ImpersonationLevel = 0;
  495. PerUserInitialization = FALSE;
  496. Pure = FALSE;
  497. UnloadTimeout = NULL;
  498. };
  499. instance of __Win32Provider
  500. {
  501. Name = "MicrosoftHM_ActionTriggerEventProvider";
  502. CLSID = "{68AC0D44-DB09-11d2-8F56-006097919914}";
  503. DefaultMachineName = NULL;
  504. ClientLoadableCLSID = NULL;
  505. ImpersonationLevel = 0;
  506. PerUserInitialization = FALSE;
  507. Pure = FALSE;
  508. UnloadTimeout = NULL;
  509. };
  510. instance of __EventProviderRegistration
  511. {
  512. provider = "__Win32Provider=\"MicrosoftHM_SystemEventProvider\"";
  513. EventQueryList = {"select * from MicrosoftHM_SystemStatusEvent"};
  514. };
  515. instance of __EventProviderRegistration
  516. {
  517. provider = "__Win32Provider=\"MicrosoftHM_DataGroupEventProvider\"";
  518. EventQueryList = {"select * from MicrosoftHM_DataGroupStatusEvent"};
  519. };
  520. instance of __EventProviderRegistration
  521. {
  522. provider = "__Win32Provider=\"MicrosoftHM_DataCollectorEventProvider\"";
  523. EventQueryList = {"select * from MicrosoftHM_DataCollectorStatusEvent"};
  524. };
  525. instance of __EventProviderRegistration
  526. {
  527. provider = "__Win32Provider=\"MicrosoftHM_DataCollectorPerInstanceEventProvider\"";
  528. EventQueryList = {"select * from MicrosoftHM_DataCollectorPerInstanceStatusEvent"};
  529. };
  530. instance of __EventProviderRegistration
  531. {
  532. provider = "__Win32Provider=\"MicrosoftHM_ThresholdEventProvider\"";
  533. EventQueryList = {"select * from MicrosoftHM_ThresholdStatusEvent"};
  534. };
  535. instance of __EventProviderRegistration
  536. {
  537. provider = "__Win32Provider=\"MicrosoftHM_ActionEventProvider\"";
  538. EventQueryList = {"select * from MicrosoftHM_ActionStatusEvent"};
  539. };
  540. instance of __EventProviderRegistration
  541. {
  542. provider = "__Win32Provider=\"MicrosoftHM_ActionTriggerEventProvider\"";
  543. EventQueryList = {"select * from MicrosoftHM_ActionTriggerEvent"};
  544. };
  545. /////////////////////////////////////////////////////////////////////////////////////////////
  546. // Permanent Consumer
  547. /////////////////////////////////////////////////////////////////////////////////////////////
  548. instance of __Win32Provider
  549. {
  550. Name = "MicrosoftHM_PermConsumer";
  551. Clsid = "{68AC0D35-DB09-11d2-8F56-006097919914}";
  552. };
  553. instance of __EventConsumerProviderRegistration
  554. {
  555. Provider = "__Win32Provider=\"MicrosoftHM_PermConsumer\"";
  556. ConsumerClassNames = {"MicrosoftHM_PermConsumer"};
  557. };
  558. class MicrosoftHM_PermConsumer : __EventConsumer
  559. {
  560. [key] string Name;
  561. };
  562. instance of MicrosoftHM_PermConsumer
  563. {
  564. Name = "HealthMon";
  565. };
  566. ///////////////////////////////////////////////////////////////////////////////////////////
  567. // TIMER EVENT
  568. ////////////////////////////////////////////////////////////////////////////////////////////
  569. // create an instance of Timer
  570. instance of __IntervalTimerInstruction
  571. {
  572. IntervalBetweenEvents = 10000; // Initially set to 10 seconds
  573. TimerId = "MicrosoftHM_Timer";
  574. };
  575. //MOVED to timer.mof
  576. ////////////////////////////////////////////////////////////////////////////////////////////
  577. // create an instance of TimerEvent Filter
  578. //instance of __EventFilter
  579. //{
  580. // Name = "MicrosoftHM_Filter";
  581. // Query = "select * from __TimerEvent where TimerId=\"MicrosoftHM_Timer\"";
  582. // QueryLanguage = "WQL";
  583. //};
  584. ///////////////////////////////////////////////////////////////////////////////////////////
  585. // HMSystemConfiguration EVENTS
  586. instance of __EventFilter
  587. {
  588. Name = "MicrosoftHM_Filter2";
  589. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_SystemConfiguration\"";
  590. QueryLanguage = "WQL";
  591. };
  592. ///////////////////////////////////////////////////////////////////////////////////////////
  593. // HMDataGroupConfiguration EVENTS
  594. instance of __EventFilter
  595. {
  596. Name = "MicrosoftHM_Filter3";
  597. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_DataGroupConfiguration\"";
  598. QueryLanguage = "WQL";
  599. };
  600. ///////////////////////////////////////////////////////////////////////////////////////////
  601. // HMDataCollectorConfiguration EVENTS
  602. instance of __EventFilter
  603. {
  604. Name = "MicrosoftHM_Filter4";
  605. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_DataCollectorConfiguration\"";
  606. QueryLanguage = "WQL";
  607. };
  608. ///////////////////////////////////////////////////////////////////////////////////////////
  609. // HMThresholdConfiguration EVENTS
  610. instance of __EventFilter
  611. {
  612. Name = "MicrosoftHM_Filter5";
  613. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_ThresholdConfiguration\"";
  614. QueryLanguage = "WQL";
  615. };
  616. ///////////////////////////////////////////////////////////////////////////////////////////
  617. // HMConfigurationAssociation EVENTS
  618. instance of __EventFilter
  619. {
  620. Name = "MicrosoftHM_Filter6";
  621. Query = "select * from __InstanceCreationEvent where TargetInstance isa \"MicrosoftHM_ConfigurationAssociation\"";
  622. QueryLanguage = "WQL";
  623. };
  624. ///////////////////////////////////////////////////////////////////////////////////////////
  625. // HMActionConfiguration EVENTS
  626. instance of __EventFilter
  627. {
  628. Name = "MicrosoftHM_Filter7";
  629. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_ActionConfiguration\"";
  630. QueryLanguage = "WQL";
  631. };
  632. instance of __EventFilter
  633. {
  634. Name = "MicrosoftHM_Filter8";
  635. Query = "select * from __InstanceCreationEvent where TargetInstance isa \"MicrosoftHM_ActionConfiguration\"";
  636. QueryLanguage = "WQL";
  637. };
  638. ///////////////////////////////////////////////////////////////////////////////////////////
  639. // HMActionConfigurationActionAssociation EVENTS
  640. instance of __EventFilter
  641. {
  642. Name = "MicrosoftHM_Filter9";
  643. Query = "select * from __InstanceCreationEvent where TargetInstance isa \"MicrosoftHM_ConfigurationActionAssociation\"";
  644. QueryLanguage = "WQL";
  645. };
  646. instance of __EventFilter
  647. {
  648. Name = "MicrosoftHM_Filter10";
  649. Query = "select * from __InstanceModificationEvent where TargetInstance isa \"MicrosoftHM_ConfigurationActionAssociation\"";
  650. QueryLanguage = "WQL";
  651. };
  652. instance of __EventFilter
  653. {
  654. Name = "MicrosoftHM_Filter11";
  655. Query = "select * from __InstanceDeletionEvent where TargetInstance isa \"MicrosoftHM_ConfigurationActionAssociation\"";
  656. QueryLanguage = "WQL";
  657. };
  658. /////////////////////////////////////////////////////////////////////////////////////////////
  659. // *** Binding Section ***
  660. instance of __FilterToConsumerBinding
  661. {
  662. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  663. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter\"";
  664. };
  665. instance of __FilterToConsumerBinding
  666. {
  667. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  668. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter2\"";
  669. };
  670. instance of __FilterToConsumerBinding
  671. {
  672. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  673. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter3\"";
  674. };
  675. instance of __FilterToConsumerBinding
  676. {
  677. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  678. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter4\"";
  679. };
  680. instance of __FilterToConsumerBinding
  681. {
  682. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  683. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter5\"";
  684. };
  685. instance of __FilterToConsumerBinding
  686. {
  687. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  688. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter6\"";
  689. };
  690. instance of __FilterToConsumerBinding
  691. {
  692. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  693. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter7\"";
  694. };
  695. instance of __FilterToConsumerBinding
  696. {
  697. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  698. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter8\"";
  699. };
  700. instance of __FilterToConsumerBinding
  701. {
  702. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  703. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter9\"";
  704. };
  705. instance of __FilterToConsumerBinding
  706. {
  707. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  708. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter10\"";
  709. };
  710. instance of __FilterToConsumerBinding
  711. {
  712. Consumer = "MicrosoftHM_PermConsumer.Name=\"HealthMon\"";
  713. Filter = "__EventFilter.Name=\"MicrosoftHM_Filter11\"";
  714. };
  715. ////////////////////////////////////////////////////////////////////////////////
  716. instance of MicrosoftHM_SystemConfiguration AS $S1
  717. {
  718. GUID = "{@}";
  719. Name = ".";
  720. StartupDelayTime = 0; // In seconds
  721. MaxInstancesPerDataCollector = 40;
  722. };