{"id":3514,"date":"2013-03-09T22:25:10","date_gmt":"2013-03-09T21:25:10","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=3514"},"modified":"2013-03-09T22:25:10","modified_gmt":"2013-03-09T21:25:10","slug":"tracking-logon-and-logoff-activities-in-service-manager","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=3514","title":{"rendered":"Tracking Logon and Logoff Activities in Service Manager"},"content":{"rendered":"<p><span>Last week I\u00c2\u00a0received\u00c2\u00a0a e-mail around tracking <span>logon<\/span> and <span>logoff<\/span> activities Service Manager\u00c2\u00a0with Operations Manager. It can be solved with a event collection rule and the default custom event report.<\/span><\/p>\n<ol>\n<li><span style=\"line-height: 13px;\">In Operations Manager console, navigate to the Authoring\u00c2\u00a0work space\u00c2\u00a0and Rules<\/span><\/li>\n<li>Create a new rule of type Collection Rules\/Event Based\/NT Event Log<\/li>\n<li>Select a suitable management pack or create a new management pack, Next<\/li>\n<li><span>Input a rule name, for example <span>Contoso<\/span> &#8211; Service Manager &#8211; <span>Logon<\/span> and <span>Logoff<\/span><\/span><\/li>\n<li><span>Select a rule target. If you have the Service Manager management pack imported you can use the SCSM 2012 Management Server class as target. <span>Logon<\/span> and <span>Logoff<\/span> events will be generated on your Service Manager management servers. Next<\/span><\/li>\n<li>Event Log Type, select or input Operations Manager, Next<\/li>\n<li><span>Build Event Expression like in the figure below, then save the new rule. In the example I exclude all events about my service accounts, all\u00c2\u00a0service\u00c2\u00a0accounts starts with <span>svc<\/span>. \u00c2\u00a0Event ID 26328 is <span>logon<\/span> and event id 26329 is <span>logoff<\/span>.<\/span><\/li>\n<\/ol>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3515\" alt=\"20130309_SCSM01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM01-300x105.jpg\" width=\"300\" height=\"105\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM01-300x105.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM01.jpg 493w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span>Once the rule is created and deployed to your Service Manager management servers they will start report back events as soon as someone <span>logon<\/span> or <span>logoff<\/span> Service Manager. You can create a event view in the same management pack and configure the event view to show events generated by your new rule.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM02.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3516\" alt=\"20130309_SCSM02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM02-300x261.jpg\" width=\"300\" height=\"261\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM02-300x261.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM02.jpg 886w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>To show this data in a report you can use the default Reporting, Microsoft Generic Report Library, Custom Event report. The following figure show configuration of the Custom Event report<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM03.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3518\" alt=\"20130309_SCSM03\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM03-300x48.jpg\" width=\"300\" height=\"48\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM03-300x48.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM03-1024x166.jpg 1024w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM03.jpg 1156w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>and the result of the report<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM04.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3520\" alt=\"20130309_SCSM04\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM04-300x147.jpg\" width=\"300\" height=\"147\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM04-300x147.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/03\/20130309_SCSM04.jpg 890w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>If you want to look at the events in the Operations Manager data warehouse database you can use the following SQL query<\/p>\n<blockquote><p><span>select * from Event.<span>vEvent<\/span> <span>ev<\/span><\/span><br \/>\n<span> inner join Event.<span>vEventDetail<\/span> <span>evd<\/span> on <span>ev<\/span>.<span>eventoriginid<\/span> = <span>evd<\/span>.<span>eventoriginid<\/span><\/span><br \/>\n<span> inner join Event.<span>vEventParameter<\/span> <span>evp<\/span> on <span>ev<\/span>.<span>eventoriginid<\/span> = <span>evp<\/span>.<span>eventoriginid<\/span><\/span><br \/>\n<span> where <span>eventdisplaynumber<\/span> = &#8216;26329&#8217; OR <span>eventdisplaynumber<\/span> = &#8216;26328&#8217;<\/span><\/p><\/blockquote>\n<p>If you want to build your own report you can use SQL Report Builder. I have a example of that <a title=\"Author Custom Reports in Ops Mgr 2007\" href=\"http:\/\/contoso.se\/blog\/?p=398\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week I\u00c2\u00a0received\u00c2\u00a0a e-mail around tracking logon and logoff activities Service Manager\u00c2\u00a0with Operations Manager. It can be solved with a event collection rule and the default custom event report. In Operations Manager console, navigate to the Authoring\u00c2\u00a0work space\u00c2\u00a0and Rules Create a new rule of type Collection Rules\/Event Based\/NT Event Log Select a suitable management pack &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=3514\">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":[61,25],"tags":[],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3514"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3514"}],"version-history":[{"count":4,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3514\/revisions"}],"predecessor-version":[{"id":3522,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3514\/revisions\/3522"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3514"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}