Kaseya Community

Monitor Based on WMI value

  • Hi

    Does anyone know if it is possible to setup a monitor based on a WMI counter that is not normally available through Perfmon?


    Legacy Forum Name: Monitor Based on WMI value,
    Legacy Posted By Username: lmcintosh
  • I've found that creating a VBScript to read the WMI values to a log file or a custom event log entry works, other than that I've not found a way to do it

    For example:

    Const adOpenStatic = 3
    Const adLockOptimistic = 3
    Const adUseClient = 3
    CRLF = Chr(13) & Chr(10)
    Const wbemFlagReturnImmediately = &h10
    Const wbemFlagForwardOnly = &h20
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\" & cWMINameSpace)
    Set colItems = objWMIService.ExecQuery(query, "WQL", _
    wbemFlagReturnImmediately + wbemFlagForwardOnly)

    from colItems you can iterate through with a "for each" loop and output the fields you want to a log file.

    Of course log parsing doesnt seem to work properly so... Stick out tongue

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: Octavia