{"id":1357,"date":"2010-03-08T09:04:21","date_gmt":"2010-03-08T07:04:21","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=1357"},"modified":"2010-03-08T09:06:55","modified_gmt":"2010-03-08T07:06:55","slug":"investigate-most-common-alert","status":"publish","type":"post","link":"https:\/\/contoso.se\/blog\/?p=1357","title":{"rendered":"Investigate most common alert"},"content":{"rendered":"<p>The following SQL queries can be used to first\u00c2\u00a0list which machine or\u00c2\u00a0path and then\u00c2\u00a0rules or monitors that generate most alerts in your environment. The first query will show you which computer or path that generate most alerts. The second query will show you which rule or monitor that generate most alerts on one singel machine or path. Run both queries against your data warehouse database (OperationsManagerDW).<\/p>\n<div style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1358  aligncenter\" title=\"SQL01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL01-300x266.jpg\" alt=\"\" width=\"300\" height=\"266\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL01-300x266.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL01.jpg 690w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p style=\"text-align: center;\">\u00c2\u00a0<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL02.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1359  aligncenter\" title=\"SQL02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL02-300x222.jpg\" alt=\"\" width=\"300\" height=\"222\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL02-300x222.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/03\/SQL02.jpg 702w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<div>All Path<code><br \/>\nSELECT<br \/>\nvManagedEntity.Path, COUNT(1) AS pathcount<\/code><\/div>\n<div><code>FROM Alert.vAlertDetail INNER JOIN<br \/>\nAlert.vAlert ON Alert.vAlertDetail.AlertGuid = Alert.vAlert.AlertGuid INNER JOIN<br \/>\nvManagedEntity ON Alert.vAlert.ManagedEntityRowId =<br \/>\nvManagedEntity.ManagedEntityRowId<br \/>\nGROUP BY vManagedEntity.Path<br \/>\nORDER BY pathcount DESC<\/code><\/div>\n<div><code>\u00c2\u00a0<\/code><\/div>\n<div><code>\u00c2\u00a0<\/code><\/div>\n<p><code>\u00c2\u00a0<\/p>\n<p><\/code><\/p>\n<div>One Path<code><br \/>\nSELECT<br \/>\nAlert.vAlert.AlertName,<br \/>\nAlert.vAlert.AlertDescription,<br \/>\nvManagedEntity.Path, COUNT(1) AS alertcount<br \/>\nFROM Alert.vAlertDetail INNER JOIN<br \/>\nAlert.vAlert ON Alert.vAlertDetail.AlertGuid = Alert.vAlert.AlertGuid INNER JOIN<br \/>\nvManagedEntity ON Alert.vAlert.ManagedEntityRowId =<br \/>\nvManagedEntity.ManagedEntityRowId<\/code><\/div>\n<div><code>WHERE Path = 'opsmgr29.hq.contoso.local'<br \/>\nGROUP BY Alert.vAlert.AlertName, Alert.vAlert.AlertDescription, vManagedEntity.Path<br \/>\nORDER BY alertcount DESC<\/code><\/div>\n<div><\/div>\n<div><code><\/code><\/div>\n<p>You could also use these queries in a report, take a look at <a href=\"http:\/\/contoso.se\/blog\/?p=398\">this<\/a> post about author custom reports.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following SQL queries can be used to first\u00c2\u00a0list which machine or\u00c2\u00a0path and then\u00c2\u00a0rules or monitors that generate most alerts in your environment. The first query will show you which computer or path that generate most alerts. The second query will show you which rule or monitor that generate most alerts on one singel machine &hellip; <a href=\"https:\/\/contoso.se\/blog\/?p=1357\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[13,19],"tags":[],"_links":{"self":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357"}],"collection":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1357"}],"version-history":[{"count":7,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357\/revisions"}],"predecessor-version":[{"id":1365,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357\/revisions\/1365"}],"wp:attachment":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}