{"id":224,"date":"2005-09-28T21:12:50","date_gmt":"2005-09-29T02:12:50","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=224"},"modified":"2005-09-28T21:12:50","modified_gmt":"2005-09-29T02:12:50","slug":"224","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=224","title":{"rendered":""},"content":{"rendered":"<p><a href=\"http:\/\/forums.cacti.net\/about1041-15.html\">add new check to cacti<\/a><br \/>\n<!--more--><\/p>\n<p>As promised the example.<\/p>\n<p>This example creates a graph that shows active memory usage for a Windows System. The script uses the Nagios\/NetSaint plugins to interrogate the Nagios\/NetSaint agent installed on the Windows System.<\/p>\n<p>1. I want to view Committted and Available Memory, this means that I will have to create a multiple outplut script<\/p>\n<p>2. The perl script that will interrogate the Windows Performance Counter<br \/>\nCode:<\/p>\n<p>#!\/usr\/bin\/perl<\/p>\n<p>$avail = `\/usr\/lib\/nagios\/plugins\/check_nt -H $ARGV[0] -p 20000 -v COUNTER -l &#8220;\\\\Memory\\\\Available Bytes&#8221;`;<br \/>\nchomp $avail;<br \/>\n$commit = `\/usr\/lib\/nagios\/plugins\/check_nt -H $ARGV[0] -p 20000 -v COUNTER -l &#8220;\\\\Memory\\\\Committed Bytes&#8221;`;<br \/>\nchomp $commit;<br \/>\nprint &#8220;commit:$commit avail:$avail\\n&#8221;;<\/p>\n<p>\n3. The Data Input Method in Cacti: See attached file &#8216;DataInputMethod.jpg&#8221;<br \/>\n&#8211; The &#8220;Input String&#8221; field is equal to:<br \/>\n&#8220;perl <path_cacti>\/scripts\/check_nt_mem.pl <ip>&#8220;<\/p>\n<p>4. The Data Source Template: See attached File &#8220;DataSource.jpg&#8221;<br \/>\n&#8211; The Data source Item &#8220;Mem_Commit&#8221; uses the output field &#8220;commit &#8211; Committed Memory&#8221;<\/p>\n<p>5. The Graph Template: See attached File &#8220;Graph.jpg&#8221;<\/p>\n<p>6. You can now add a Polling Host and use the graph template.<\/p>\n<p>Hope this helps,<br \/>\nKwabbernoot<\/p>\n<p>DataInputMethod.jpg<br \/>\n Description: \t<br \/>\nData Input<br \/>\n Filesize: \t 75.52 KB<br \/>\n Viewed: \t 5999 Time(s)<\/p>\n<p>DataInputMethod.jpg<\/p>\n<p>DataSource.jpg<br \/>\n Description: \t<br \/>\nData Source Template<br \/>\n Filesize: \t 141.91 KB<br \/>\n Viewed: \t 5999 Time(s)<\/p>\n<p>DataSource.jpg<\/p>\n<p>Graph.jpg<br \/>\n Description: \t<br \/>\nGraph Template<br \/>\n Filesize: \t 210.02 KB<br \/>\n Viewed: \t 5999 Time(s)<\/p>\n<p>Graph.jpg<\/p>\n","protected":false},"excerpt":{"rendered":"<p>add new check to cacti<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=224"}],"version-history":[{"count":0,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}