{"id":213,"date":"2007-08-09T18:15:25","date_gmt":"2007-08-09T16:15:25","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=213"},"modified":"2010-09-01T12:33:31","modified_gmt":"2010-09-01T10:33:31","slug":"script-that-returns-performance-data","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=213","title":{"rendered":"Script That Returns Performance Data"},"content":{"rendered":"<p>I have made a script that will search for a word in a logfile and send the result back as performance data to Ops Mgr 2007.<\/p>\n<p>With default settings will the script look in the IIS log files (C:\\windows\\system32\\LogFiles\\W3SVC1\\)\u00c2\u00a0for the last hour and search for the word &#8220;POST&#8221;. It will then return how many times that word is in the file as performance data.\u00c2\u00a0<\/p>\n<p>To use this script you\u00c2\u00a0can create a new \u00c2\u00a0Collection Rules\/Probe Based\/Script (Performance), paste the script into the &#8220;script box&#8221;, input suitable performance mapping information. If you change the\u00c2\u00a0&#8220;Value&#8221; (default $Data\/Property[@Name=&#8217;PerfValue&#8217;]$) you must also change this in the script. Remeber to configure your IIS to generate a logfile for every hour, or modify the script.<\/p>\n<p>I have configure my script to run every 70 minutes synchronize at 00:00. It will then run 10 minutes past every hour and tot up the hour before.<\/p>\n<p>You can download the script <a href=\"http:\/\/www.contoso.se\/files\/count_script.rar\">here<\/a>. Send me a e-mail if you have any feedback or suggestions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made a script that will search for a word in a logfile and send the result back as performance data to Ops Mgr 2007. With default settings will the script look in the IIS log files (C:\\windows\\system32\\LogFiles\\W3SVC1\\)\u00c2\u00a0for the last hour and search for the word &#8220;POST&#8221;. It will then return how many times &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=213\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","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":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/213"}],"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=213"}],"version-history":[{"count":1,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":1784,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions\/1784"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}