{"id":177,"date":"2011-07-11T06:16:35","date_gmt":"2011-07-11T06:16:35","guid":{"rendered":"http:\/\/edcint.co.nz\/checkwmiplus\/quick-start\/"},"modified":"2022-07-02T08:39:42","modified_gmt":"2022-07-01T22:39:42","slug":"quick-start","status":"publish","type":"page","link":"https:\/\/edcint.co.nz\/checkwmiplus\/installation\/quick-start\/","title":{"rendered":"Quick Start"},"content":{"rendered":"<p><strong>NOTE: For the legacy information refer to<\/strong> <a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/installation\/quick-start-legacy\/\">Quick Start (Legacy)<\/a><\/p>\n<p>This quick-start guide will provide very high level instructions on how to get Check WMI Plus up and running on your Nagios system.<br \/>\nIt assumes that you will be able to &#8220;fill in&#8221; a lot of the missing information by either reading the other pages on this site or with your general IT knowledge.<br \/>\nThere is some more detail in the <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/installation\/\">installation<\/a> page.<\/p>\n<p><strong>Preparing the Monitored Windows System(s)<\/strong><br \/>\nOn the Windows system(s)\/Domain that will be monitored:<\/p>\n<ul>\n<li>Create a user that will be used for Check WMI Plus<\/li>\n<li>Remove login rights. Add Domain Admin privileges. <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/faq\/how-do-i-setup-the-windows-user-for-wmic-or-what-permissions-do-i-need\/\">Here is<\/a> some documentation around about how to reduce the privilege required<\/li>\n<\/ul>\n<p><strong>Prerequisites<\/strong><\/p>\n<p>Check WMI Plus requires the <a href=\"https:\/\/github.com\/cesbit\/aiowmi\/tree\/main\/contrib\/wmic_server\">WMIC Server<\/a> which is part of the <a href=\"https:\/\/github.com\/cesbit\/aiowmi\">aiowmi project<\/a>. To install that simply change into the directory where you want it installed and <code>git clone https:\/\/github.com\/cesbit\/aiowmi<\/code>. The github page for <a href=\"https:\/\/github.com\/cesbit\/aiowmi\/tree\/main\/contrib\/wmic_server\">WMIC Server<\/a> contains information on how to install that. In summary, you create a long running API server that accepts WMI queries from Check WMI Plus. WMIC Server forwards the WMI queries to the target Windows host.<\/p>\n<p>Test the WMIC Server following the <a href=\"https:\/\/github.com\/cesbit\/aiowmi\/tree\/main\/contrib\/wmic_server#sample-usage\">sample usage instructions<\/a><\/p>\n<p><strong>Installing the Plugin<\/strong><br \/>\n<a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/releases\/\">Download<\/a> the latest version of the plugin.<\/p>\n<p><cite>Version 1.60 and later<\/cite><br \/>\nUntar the download bundle to a temporary directory before moving the files to their final locations.<br \/>\nThe download bundle contains all the executable files at the top level of the bundle. You will want to copy these files to a folder such as \/usr\/local\/bin.<br \/>\nAn etc folder is also contained in the bundle. This etc folder should be copied to \/etc as this is now the default location for the config file and ini files.<br \/>\nRename check_wmi_plus.conf.sample to check_wmi_plus.conf<br \/>\nEdit check_wmi_plus.conf and set all the directory locations.<br \/>\nMake sure the config files are all readable and writable by the Nagios user<br \/>\nRemove the temporary folder<\/p>\n<p><cite>All versions<\/cite><br \/>\nNow make sure you have the required perl modules installed (listed <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/installation\/\">here<\/a>). The easiest way to do this is just to run the plugin. If you get an error like &#8220;Can&#8217;t locate SOMENAME.pm&#8221; then you are missing a required perl module.<\/p>\n<p><strong>Testing the Plugin<\/strong><br \/>\nRun some basic command-line checks:<br \/>\n(Note some checks will need to be run twice to get meaningful output since they require 2 WMI queries).<\/p>\n<p>Run this twice: <code>check_wmi_plus.pl -H HOST -m checkcpu -u USER -p PASS<\/code><br \/>\nExpected Output: <code>OK (Sample Period 26 sec) - Average CPU Utilisation 15.19%|'Avg CPU Utilisation'=15.19%; <\/code><\/p>\n<p>Run this: <code>check_wmi_plus.pl -H HOST -m sample -s minimal -u USER -p PASS<\/code><br \/>\nExpected Output: <code>OK - Caption=Microsoft Windows XP Professional, Service Pack 3<\/code><\/p>\n<p>Run this: <code>check_wmi_plus.pl -H HOST -m checkdrivesize -u USER -p PASS -a c: -o 1<\/code><br \/>\nExpected <code>Output: OK - C: Total=19.99GB, Used=11.66GB (58.3%), Free=8.33GB (41.7%)     |'C: Space'=11.66GB; 'C: Utilisation'=58.3%; <\/code><\/p>\n<p>Run this: <code>check_wmi_plus.pl -H HOST -m checkservice -u USER -p PASS -a auto<\/code><br \/>\nExpected <code>Output: OK - Found 36 Services(s), 36 OK and 0 with problems. |'Total Service Count'=36; 'Service Count OK State'=36; 'Service Count Problem State'=0;<\/code><\/p>\n<p>Try an ini file check:<br \/>\nRun this twice: <code>check_wmi_plus.pl -H HOST -m checkeachcpu -u USER -p PASS<\/code><br \/>\nExpected Output: <code>OK (Sample Period 21 sec) - CPU0=43.8%   CPU_Total=43.8%   |'Avg Utilisation CPU0'=43.8%; 'Avg Utilisation CPU_Total'=43.8%; <\/code><\/p>\n<p><strong>Setting Up Nagios for Check WMI Plus<\/strong><br \/>\nAdd these <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/nagios-configuration\/nagios-command-definitions\/\">Nagios Command Definitions<\/a>.<br \/>\nAdd these <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/nagios-configuration\/nagios-service-definitions\/\">Nagios Service Definitions<\/a> (make sure you modify them to suit you!)<br \/>\nUse some <a href=\"http:\/\/edcint.co.nz\/checkwmiplus\/nagios-configuration\/nagios-host-defintions\/\">Nagios Host\/Hostgroup Definitions<\/a> (make sure you modify them to suit you!)<br \/>\nReload Nagios.<\/p>\n<p><strong>Customise Your Checks<\/strong><br \/>\nRun: <code>check_wmi_plus.pl --help<\/code><br \/>\nRead the <cite>&#8220;WARNING AND CRITICAL SPECIFICATION&#8221;<\/cite> section of the check_wmi_plus.pl &#8211;help output so that you can add your own warning\/critical criteria.<\/p>\n<p>Run: <code>check_wmi_plus.pl --help<\/code><br \/>\nRead about all the checks that can be made.<\/p>\n<p>Create your own checks by copying various sections from the .ini files into your own mycustom.ini file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: For the legacy information refer to Quick Start (Legacy) This quick-start guide will provide very high level instructions on how to get Check WMI&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":64,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-177","page","type-page","status-publish","hentry","category-documentation"],"_links":{"self":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":14,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/177\/revisions"}],"predecessor-version":[{"id":691,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/177\/revisions\/691"}],"up":[{"embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/64"}],"wp:attachment":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}