none
OpsMgr website monitoring

    Question

  • I have a need to monitor a number of URLs - that is pretty easy to setup. I now have a number of monitors running (every 2 min). Now I would like to change the alerting part so when a URL fails to respond I raise one type of alert and on the second failure (two minutes later) a different type of alert is raised (and send of to a different team).

    Any suggestions?
    Thanks,

    Lars

    Monday, May 14, 2012 6:18 PM

Answers

All replies

  • Here is a powershell script we run to enhance web site monitoring. Basically if it finds any web alerts in the console it will regenerate the alert. Not exactly what you are looking for but similar nonetheless you can customize...this works great for us as alerts will keep sending emails until action is taken... :)


    #Script to Update New Web Synthetic Alerts
    Add-PSSnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"
    -ErrorVariable errSnapin;
    Set-Location "OperationsManagerMonitoring::" -ErrorVariable errSnapin;
    new-managementGroupConnection -ConnectionString:'svr-scom01.you.com' -ErrorVariable
    errSnapin;
    set-location 'svr-scom01.you.com' -ErrorVariable errSnapin;

    #Simple WebMon Alerts
    $SimpleAlerts = get-alert -criteria "ResolutionState=0" | where-object
    {$_.MonitoringObjectName -like "http*" -and $_.MonitoringObjectPath -eq
    "svr-scom01.you.com"}
    if($SimpleAlerts -eq $null){"No Alerts Exist"} else{ForEach($Alert in
    $SimpleAlerts){$Alert.Update("")}}




    Monday, May 14, 2012 6:58 PM
  • Thanks Julia,

    While I am sure this would work I am not sure the script will detect that the error condition has existed for two cycles and I am not particulary happy about an external process that needs to run to update alerts. But I should probably start considering writing my own script to do the monitoring.

    Thanks,
    Lars

    Monday, May 14, 2012 8:04 PM
  • Based on my understanding, I think you may need to create a script based three state URL monitor. I just noticed a two state monitor in the following thread, please refer to it:

    URL Script Monitor

    http://social.technet.microsoft.com/Forums/en/operationsmanagermgmtpacks/thread/8d02d275-6f95-4aaf-95b0-c01582d76c1f

    Hope this helps.

    Thanks.

    Nicholas Li

    TechNet Community Support

    Monday, May 21, 2012 5:29 AM