Forum Discussion
Anonymous
5 years agoOn 4/17/2020 at 2:00 PM, Mike Moniz said:set 0=OK and 1=Not OK
This is exactly what I attempted to do, but I took it a step further. The WMI collector polls the string contained in status/state and checks for presence of one good value. Since this version is groovy, we can enumerate like this:
//Enumerations obtained from https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-service and put in my preferred order so that they are in ascending severity. This allows thresholds for >= 1 3 5. stateEnum = [ "Running", "Start Pending", "Stop Pending", "Continue Pending", "Pause Pending", "Stopped", "Paused", "Unknown" ] statusEnum = [ "OK", "Error", "Degraded", "Unknown", "Pred Fail", "Starting", "Stopping", "Service", "Stressed", "NonRecover", "No Contact", "Lost Comm" ]
I took all the possible values and tried to sort them into ascending order of problem so that 0 is the optimum state and the higher the number, the higher the criticality of the problem. If you have suggestions on a better, I'm completely open to reordering this.
Related Content
- 2 years ago
- 7 months ago
- 8 months ago
- 5 months ago