{"id":682,"date":"2022-07-02T08:31:12","date_gmt":"2022-07-01T22:31:12","guid":{"rendered":"https:\/\/edcint.co.nz\/checkwmiplus\/?page_id=682"},"modified":"2022-07-02T08:40:15","modified_gmt":"2022-07-01T22:40:15","slug":"quick-start-legacy","status":"publish","type":"page","link":"https:\/\/edcint.co.nz\/checkwmiplus\/installation\/quick-start-legacy\/","title":{"rendered":"Quick Start (Legacy)"},"content":{"rendered":"<p><strong>NOTE: This is the legacy page which refers to the legacy wmic command line binary. For information using the new wmic_server, refer to <a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/installation\/quick-start\/\">Quick Start<\/a><br \/>\n<\/strong><\/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.<br \/>\nThere are comprehensive installation examples here:<\/p>\n<ul>\n<li><a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/installation-terminal-session\/\">Fedora 16<\/a> (from 2012, wmic compile, Check WMI Plus install)<\/li>\n<li><a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/installation-terminal-session-fedora-33\/\">Fedora 33<\/a> (from 2021, wmic compile only)<\/li>\n<li><a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/installation-terminal-session-raspbian-buster\/\">Raspbian Buster<\/a> (from 2021, wmic compile only)<\/li>\n<\/ul>\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><br \/>\nGet Zenoss wmic working.<br \/>\nEither from source:<\/p>\n<ul>\n<li>Download the <a href=\"https:\/\/edcint.co.nz\/checkwmiplus\/download\/wmic-source-v1-4-1\/\">source<\/a><\/li>\n<li>Compile it and either make install or just find and copy wmic to a location on your Nagios server.<\/li>\n<\/ul>\n<p>or from an RPM:<\/p>\n<ul>\n<li>Find an RPM from <a href=\"http:\/\/rpm.pbone.net\">rpm.pbone.net<\/a>.<\/li>\n<li>If you are lucky, you probably don&#8217;t need to install the RPM (depending on how it was built), and you may just be able to extract wmic and copy it to a location on your Nagios server.<\/li>\n<\/ul>\n<p>Test wmic.<br \/>\nCommand Line: <code>\/bin\/wmic -U USER%PASS \/\/HOST 'Select Caption From Win32_OperatingSystem'<\/code><br \/>\nExpected Output should be similar to:<br \/>\n<code>CLASS: Win32_OperatingSystem<br \/>\nCaption|Name<br \/>\nMicrosoft Windows XP Professional|Microsoft Windows XP Professional|C:WINDOWS|DeviceHarddisk0Partition1<br \/>\n<\/code><\/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.46 and earlier<\/cite><br \/>\nUntar it to the directory of your choice.<br \/>\nEdit check_wmi_plus.pl<br \/>\nFind all the lines with &#8220;# CHANGE THIS IF NEEDED&#8221; and ensure that those settings meet your requirements.<\/p>\n<p><cite>Version 1.47 and later<\/cite><br \/>\nUntar it to the directory of your choice.<br \/>\nRename check_wmi_plus.conf.sample to check_wmi_plus.conf<br \/>\nEdit check_wmi_plus.pl and set $conf_file to the location of your copy of check_wmi_plus.conf<br \/>\nEdit check_wmi_plus.conf and set all the directory locations.<\/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: This is the legacy page which refers to the legacy wmic command line binary. For information using the new wmic_server, refer to Quick Start&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,21],"tags":[],"class_list":["post-682","page","type-page","status-publish","hentry","category-documentation","category-legacy"],"_links":{"self":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/682","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=682"}],"version-history":[{"count":2,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/682\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/pages\/682\/revisions\/686"}],"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=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}