{"id":727,"date":"2018-09-29T01:28:30","date_gmt":"2018-09-28T22:28:30","guid":{"rendered":"http:\/\/kifarunix.com\/?p=727"},"modified":"2024-03-11T19:35:11","modified_gmt":"2024-03-11T16:35:11","slug":"how-to-install-nsclient-nagios-monitoring-agent-on-windows-system","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-nsclient-nagios-monitoring-agent-on-windows-system\/","title":{"rendered":"How to Install NSClient Nagios Monitoring Agent on Windows System"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1061\" height=\"594\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/05\/install-nsclient-nagios-agent-windows.png\" alt=\"Install NSClient Nagios Monitoring Agent on Windows System\" class=\"wp-image-16641\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/05\/install-nsclient-nagios-agent-windows.png?v=1684057593 1061w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/05\/install-nsclient-nagios-agent-windows-768x430.png?v=1684057593 768w\" sizes=\"(max-width: 1061px) 100vw, 1061px\" \/><\/figure>\n\n\n\n<p>In this tutorial, we are going to learn how to install NSClient Nagios monitoring agent on Windows systems. <span class=\"listing-desc\"><a href=\"https:\/\/nsclient.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">NSClient++ <\/a>is a monitoring agent\/daemon for Windows systems that makes it easier to collect performance metrics by Nagios.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Nagios NSClient Agent on Windows System<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Download NSClient Agent<\/h3>\n\n\n\n<p>Download the latest version of NSClient from <a href=\"http:\/\/nsclient.org\/download\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install and Configure NSClient++ Nagios Agent on Windows System<\/h3>\n\n\n\n<p>Once the download is done, run the binary installer as an administrator to install the application.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"426\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/NSClient-inst-1.png\" alt=\"Install NSClient Nagios Monitoring Agent on Windows System\" class=\"wp-image-772\" title=\"\"><\/figure><\/div>\n\n\n<p>Once the installation launches, a<span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">ccept the default options until where you are prompted to choose the setup type<\/span>.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"419\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/NSClient-inst-type-1.png\" alt=\"\" class=\"wp-image-774\" title=\"\"><\/figure><\/div>\n\n\n<p><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">Select the <\/span><span style=\"font-size: medium;\"><b>Typical<\/b><\/span><span style=\"font-size: medium;\"> installation setup type and click <\/span><span style=\"font-size: medium;\"><b>Next<\/b><\/span><span style=\"font-size: medium;\">. This takes you to agent configuration window as shown in the screenshot below;<\/span><\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"488\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/nclient-default-configs.png\" alt=\"\" class=\"wp-image-775\" title=\"\"><\/figure><\/div>\n\n\n<p>Edit the default configurations shown above as follows;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Under <strong>Allowed hosts:<\/strong> replace the loopback-v6 address, <strong>::1, <\/strong>with the IP of the Nagios Server. (In case of AlienVault, enter the IP of the Sensor)<\/li>\n\n\n\n<li>Under the <strong>Password:<\/strong> delete the existing string and set a <strong>Strong Password<\/strong> for use for communication between the Server and the Client.<strong>NOTE: The Password has to be same for a group of hosts.<\/strong><\/li>\n\n\n\n<li>Under \u201c<strong>Modules to load:<\/strong>\u201d\n<ul class=\"wp-block-list\">\n<li>Check &#8220;<em>Enable common check plugins&#8221; <\/em>and &#8220;<em>Enable nsclient server (check_nt)<\/em>&#8220;<\/li>\n\n\n\n<li>Uncheck the \u201c<strong>Enable NRPE Server (check_nrpe)<\/strong>\u201d<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"483\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/nclient-new-configs-1.png\" alt=\"Install NSClient Nagios Monitoring Agent on Windows System\" class=\"wp-image-777\" title=\"\"><\/figure><\/div>\n\n\n<p>Click <strong>Next<\/strong> and then <strong>Install<\/strong> button to launch the installation.<\/p>\n\n\n\n<p>Once the Installation is complete, click finish button to run the client.<\/p>\n\n\n\n<p>Note that the NSClient service (nscp) will automatically run after installation.<\/p>\n\n\n\n<p>It will also set a firewall rule to allow it access.<\/p>\n\n\n\n<p>Also note that nscp service listens on port 12489.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable System Service and Disk Space Checks<\/h3>\n\n\n\n<p>Open the NSClient configuration file,&nbsp;<strong>C:\\Program Files\\NSClient++\\nsclient.ini<\/strong>, with file editor such as Notepad and enable <strong>Disk space<\/strong> as well as <strong>System check<\/strong> that are disabled by default. See the highlighted lines below.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\n# If you want to fill this file with all available options run the following command:\n# nscp settings --generate --add-defaults --load-all\n# If you want to activate a module and bring in all its options use:\n# nscp settings --activate-module &lt;MODULE NAME&gt; --add-defaults\n# For details run: nscp settings --help\n\n\n; TODO\n[\/settings\/default]\n\n; Undocumented key\npassword = STRONGPASSWORD\n\n; Undocumented key\nallowed hosts = 127.0.0.1,192.168.43.101\n\n\n; TODO\n[\/modules]\n\n; Undocumented key\nCheckExternalScripts = disabled\n\n; Undocumented key\nCheckHelpers = disabled\n\n; Undocumented key\nCheckEventLog = disabled\n\n; Undocumented key\nCheckNSCP = disabled\n\n<strong>; Undocumented key<\/strong>\n<strong>CheckDisk = enabled<\/strong>\n\n<strong>; Undocumented key<\/strong>\n<strong>CheckSystem = enabled<\/strong>\n\n; Undocumented key\nNSClientServer = enabled\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Restart NSClient Service<\/h3>\n\n\n\n<p>Once the changes are made, save the file and restart the NSClient service (nscp).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"447\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/nclient-restart-service-1.png\" alt=\"\" class=\"wp-image-779\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/nclient-restart-service-1.png 990w, https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/09\/nclient-restart-service-1-768x347.png 768w\" sizes=\"(max-width: 990px) 100vw, 990px\" \/><\/figure>\n\n\n\n<p>You can also use powershell to restart the service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>net stop nscp\nnet start nscp<\/code><\/pre>\n\n\n\n<p>The installation and configuration of the NSClient is now complete. You can test from the server that the services are actually being monitored.<\/p>\n\n\n\n<p>For example to test for <strong>cpu load<\/strong> from Nagios server;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/lib\/nagios\/plugins\/check_nt -H 192.168.43.218 -p 12489 -s STRONGPASSWORD -v CPULOAD -l 5,80,90<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>CPU Load 0% (5 min average) | '5 min avg Load'=0%;80;90;0;100<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Other Tutorials<\/h2>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-server-on-oracle-linux-9\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios Server on Oracle Linux 9<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-nrpe-agents-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios NRPE Agents on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to install NSClient Nagios monitoring agent on Windows systems. NSClient++ is a monitoring agent\/daemon for Windows<\/p>\n","protected":false},"author":1,"featured_media":16641,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[73,103],"tags":[6685,146,145,144],"class_list":["post-727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nagios","category-alienvault","tag-install-nsclient-nagios-monitoring-agent-on-windows-system","tag-monitor-windows-system","tag-nagios-monitoring","tag-nsclient","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/727"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=727"}],"version-history":[{"count":14,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/727\/revisions"}],"predecessor-version":[{"id":20985,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/727\/revisions\/20985"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/16641"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}