locked
To monitor the output of a script using SCOM. RRS feed

  • Question

  • We wish to monitor the output of a script using SCOM. We know we can do it using SCOM by -
    Open SCOM
    Click on Authoring
    Click on “Monitors”
    Right-click and select “Create a monitor” -> “Unit monitor”
    Expand: “Scripting”->”Generic”->”Sample Powershell Script 2 State Monitor”

    We want to monitor the output of the script below:
    import-module RemoteDesktop
    Get-RDConnectionBrokerHighAvailability -ConnectionBroker "servername.domain.com"
    which gives the output as below

    ActiveManagementServer   : servername.domain.com
    ConnectionBroker         : {servername.domain.com, servername1.domain.com}
    ClientAccessName         : servername.domain.com
    DatabaseConnectionString : Driver=SQL Server Native Client
                               11.0;SERVER=SQLPROD2\PROD2;Trusted_connection=Yes;APP=Remote desktop Services Connecti
                               Broker;Database=DB
    DatabaseFilePath         : g:\LONXXX\VDIXXX.mdf

    I want SCOM to throw an alert when the out put is anything other than above.

    Tough part for me is the scripting part which we need to mention while creating a monitor and creating healthy and unhealthy expressions. can someone help.


    Sameer Lahane

    Thursday, July 13, 2017 7:57 AM

All replies