Tuesday, March 5, 2013

NSClient++ Clients Report Arguments not Enabled

I am currently in the process of deploying the open source Nagios monitoring platform for a customer to provide them the ability to monitor their Windows machines, network infrastructure and virtual environment.

There are a couple of Nagios agents for Windows out there such as NSClient++NC_Net and WINRPE which all do a great job of extracting Event Logs, Disk Utilization, Process Status, Service Status, Schedule Tasks, Windows Update Status, Anti Virus protection and much more.

In my deployment I chose to implement the NSClient++ on my Windows Server infrastructure.  The copy of NSClient++ I'm using is NSCP-0.4.1.90-x64.msi which I downloaded from the downloads page:


When installing the application I chose to enable both Check_NT and Check_NRPE.

Check_NT is the legacy method for monitoring Windows hosts which only provides basic reporting functionality.

Check_NRPE is the more advanced reporting functionality which provides endless functionality including the ability to execute bat, vbs and powershell scripts on hosts monitored.

After NSClient++ was installed on my servers I tested it using the following command from my Nagios server:

[root@Nagios objects]# /usr/lib/nagios/plugins/check_nrpe -H 10.1.1.40
I (0,4,1,90 2013-02-04) seem to be doing fine...


Great all is well.

Now I went to shoot a test command to check my drive size on C:\ however when running this command I got the following error:

Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).


To Resolve this problem I needed to allow arguments in the nsclient.ini file on my Windows workstation by adding the following code:

[/settings/NRPE/server]
allow arguments=1

I added this configuration just below the allowed_hosts section of the default nsclient.ini file as shown in the following screenshot:


After making this change and restarting the NSClient++ Service all was well, I was able to successfully run Check_NRPE commands against my Nagios server.


Hope this blog post helps someone.

13 comments:

  1. Helped me, thanks!

    ReplyDelete
  2. Me too !!! thanks !

    ReplyDelete
  3. Thankyou Clint, you helped me!

    ReplyDelete
  4. This worked for me too. The developer needs to update his docs....

    ReplyDelete
  5. beautiful - thanks! after googling for about 20 minutes, I came across your page and my problem was twofold - one, I needed to add [/settings/NRPE/server] above the arguments line. Second, I had to adjust it from allow_arguments to be allow arguments. restarted the nsclient++ service through services.msc and it's workin :)

    ReplyDelete
  6. Thanks, This fixed the issue you referenced. Thanks for taking the time to post for eveyone's benfit.

    ReplyDelete
  7. which command is check http or url?

    ReplyDelete