none
Getting Web transaction monitoring data from SCOM using Powershell RRS feed

  • Question

  • Hi All, 

    We currently run a few web transaction monitors to check whether some internal sites are functioning properly.

    We have an email which gets sent to key stakeholders every morning with issues. As part of that, i'd like to be able to get the information from the SCOM web transaction monitor and output this to powershell, things like the current state (Error, Warning etc) and the status code of the site (200,401,402,403 etc).

    Is this possible? I've tried multiple methods including get-scommonitor and giving it the monitor ID, but that doesn't yield the information I'm after.

    Any help would be appreciated.

    Thursday, November 7, 2019 7:01 AM

All replies

  • Hi,
     
    Based as my test in the lab, we can use the command like below to export the alert related to web application transaction monitoring with name, severity and description:
    get-scomalert -name "*web*" | select name,description,Severity | export-csv E:\share\alert123.csv 
    Note: change the value as the one in your environment.

     
    Hope it can help.
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 8, 2019 6:42 AM
  • Hi,
     
    Based as my test in the lab, we can use the command like below to export the alert related to web application transaction monitoring with name, severity and description:
    get-scomalert -name "*web*" | select name,description,Severity | export-csv E:\share\alert123.csv 
    Note: change the value as the one in your environment.

     
    Hope it can help.
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thanks Crystal.

    If we wanted to get the status of the monitor itself without needing an alert, is that something that is possible? Or would an alert need to trigger?

    Friday, November 8, 2019 8:28 AM
  • Hi,
     
    A monitor can be configured to generate an alert when health state changes to warning (yellow) or critical (red), The monitor defines when the alert generates. That is to say, it only includes some configuration. For the detail data such as state: warning, error and the error code when the website is not available, we can get it when agent collect information and compare the criteria set in the monitor or rule to generate alert.
     

    https://docs.microsoft.com/en-us/system-center/scom/manage-alert-generation-overview?view=sc-om-2019

     
    Hope it can help.
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, November 11, 2019 2:34 AM
  • Hi,

    How's everything going? If there's anything else we can help, feel free to let us know.

    Best regards.
    Crystal


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, November 14, 2019 3:15 AM
  • Hi,
     
    Long time not heard from you. To make our thread clear to read, please let me write a summary:
     
    Questions and suggestions:
    =========================
    Q1: Is that possible to get the information from the SCOM web transaction monitor and output this to PowerShell, things like the current state (Error, Warning etc) and the status code of the site (200,401,402,403 etc).
    S1: Based as my test in the lab, we can use the command like below to export the alert related to web application transaction monitoring with name, severity and description:
    get-scomalert -name "*web*" | select name,description,Severity | export-csv E:\share\alert123.csv
    Note: change the value as the one in your environment.
     
    Q2:  If we wanted to get the status of the monitor itself without needing an alert, is that something that is possible? Or would an alert need to trigger?
    S2: A monitor can be configured to generate an alert when health state changes to warning (yellow) or critical (red), The monitor defines when the alert generates. That is to say, it only includes some configuration. For the detail data such as state: warning, error and the error code when the website is not available, we can get it when agent collect information and compare the criteria set in the monitor or rule to generate alert.

    https://docs.microsoft.com/en-us/system-center/scom/manage-alert-generation-overview?view=sc-om-2019

     
    Thanks for posting in our forum. Have a nice day!
     
    Best regards.
    Crystal

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, November 28, 2019 9:39 AM