Guides‎ > ‎NRPE‎ > ‎Installing NRPE Client / Agent‎ > ‎Windows‎ > ‎

0.4.x - Creating nsclient.ini File

Sometimes it's easy to create the nsclient.ini file from scratch, so here's how to do it.

Create nsclient.ini File

  • Open a command prompt
  • Type cd "\Program Files\NSClient++\" and press Enter
  • First we'll delete the existing file
  • Type del nsclient.ini and press Enter
  • Create the file with defaults
  • Type nscp settings --generate --add-defaults and press Enter
  • Now to activate each module
  • CheckDisk Module (disk and file related checks)
    • Type nscp settings --activate-module CheckDisk --add-defaults and press Enter
  • CheckExternalScripts Module (execute external scripts)
    • Type nscp settings --activate-module CheckExternalScripts --add-defaults and press Enter
    • Type nscp settings --path "/settings/external scripts" --key "allow arguments" --set true and press Enter
    • Type nscp settings --path "/settings/external scripts" --key "allow nasty characters" --set true and press Enter
  • CheckEventLog Module (checks event logs)
    • Type nscp settings --activate-module CheckEventLog --add-defaults and press Enter
  • CheckHelpers Module (extends other checks)
    • Type nscp settings --activate-module CheckHelpers --add-defaults and press Enter
  • NRPE Listener Module (check_npre)
    • Type nscp settings --activate-module NRPEServer --add-defaults and press Enter
    • Type nscp settings --path /settings/NRPE/server --key "allow arguments" --set true and press Enter
    • Type nscp settings --path /settings/NRPE/server --key "allow nasty characters" --set true and press Enter
      • IF this is NSClient++ 0.4.3 onwards
      • Type nscp settings --path /settings/NRPE/server --key insecure --set true and press Enter
  • NSCAClient (sending passive NSCA results, don't enable unless you need it)
    • Type nscp settings --activate-module NSCAClient --add-defaults and press Enter
  • NSClientServer Listener Module (check_nt)
    • Type nscp settings --activate-module NSClientServer --add-defaults and press Enter
  • CheckSystem Module (various system related checks)
    • Type nscp settings --activate-module CheckSystem --add-defaults and press Enter
  • Scheduler Module (Scheduled Commands and jobs, useful for NSCA)
    • Type nscp settings --activate-module Scheduler --add-defaults and press Enter
  • CheckTaskSched Module (Scheduled Task checks)
    • Type nscp settings --activate-module CheckTaskSched --add-defaults and press Enter
  • CheckWMI Module (WMI checks)
    • Type nscp settings --activate-module CheckWMI --add-defaults and press Enter
  • Common settings like password (check_nt and WebServer) and allowed hosts to contact this server
    • Type nscp settings --path /settings/default --key password --set "Str0ngP@ssw0rd" and press Enter
    • Type nscp settings --path /settings/default --key "allowed hosts" --set "127.0.0.1,192.168.142.16" and press Enter
  • Web Server (Configuration Interface on port 8443)
    • Type nscp settings --activate-module WebServer --add-defaults and press Enter

Restart NSClient++

  • Type nscp service --stop and press Enter
  • Wait for the service to stop
  • Type nscp service --start and press Enter
  • Wait for the service to start


Test NSClient++

This will test that the NSClient++ is properly installed and listening for check_nrpe requests on port 5666. The following command is executed on a Nagios Core server and the computer running NSClient++ has the ip address 192.168.142.1.
  • Type /usr/local/nagios/libexec/check_nrpe -H 192.168.142.1 and press Enter
  • You should receive a response like:
    • I (0,4,1,105 2014-04-28) seem to be doing fine...
  • This confirms that NSClient++ is working

This will test that the NSClient++ is properly installed and listening for check_nt requests on port 12489. The following command is executed on a Nagios Core server and the computer running NSClient++ has the ip address 192.168.142.1.
  • Type /usr/local/nagios/libexec/check_nt -H 192.168.142.1 -p 12489 -v CLIENTVERSION and press Enter
  • If you used a password, then the command needs -s password
  • Type /usr/local/nagios/libexec/check_nt -H 192.168.142.1 -p 12489 -s Str0ngP@ssw0rd -v CLIENTVERSION and press Enter
  • You should receive a response like:
    • NSClient++ 0,4,1,105 2014-04-28
  • This confirms that NSClient++ is working