NSClient++ Help (#1) - allow_arguments doesn't work (#946) - Message List
hi, I have nsclient++ 0.4.0-153 on windows server 2008 SP1
In my nsclient.ini file I have:
; Section for external scripts configuration options (CheckExternalScripts). scripts
allow_arguments=1
allow_nasty_meta_chars=1
And from my nagios server I test it and get:
[root@nagios libexec]# ./check_nrpe -H 192.168.7.46 -p 5666 -c checkwmivalue -a 'Query=SELECT StatusCode? FROM check_ping WHERE Address="$ARG1$"' MaxCrit=1 Check:Status:=StatusCode
Request contained arguments (not currently allowed, check the allow_arguments option).
the log file says:
2012-04-04 17:16:51: e:..\..\..\..\trunk\modules\NRPEServer\handler_impl.cpp:17: Request contained arguments (not currently allowed, check the allow_arguments option).
which could be the issue?
thanks !
-
Message #2498
In 0.4.0 the configuration format has changed...
So you need to either use nsc.ini (old configuration format) or change to the new nsclient.ini.
You can change by running the following command (assuming you do HAVE nsc.ini and do NOT HAVE nsclient.ini the folder nsclient folder.
nscp settings --migrate-to ini
Michael Medin
mickem04/05/12 06:57:16 (14 months ago)-
Message #2499
But if you have a nsc.ini it will use your OLD configuration just fine (in around 95% or so of the cases) but it has to be named nsc.ini not nsclient.ini...
mickem04/05/12 06:58:09 (14 months ago)-
Message #2503
when just installed I only got nsclient.ini file (real name displayed is nsclient, but I assume it's .ini for its content), so I can't use the command because, as you said, I have not a nsc.ini file.
So what I did was change rawly the name from nsclient to nsc, but the problem is here.
what can be?
thanks.
networker_04/05/12 20:58:21 (14 months ago)-
Message #2504
this is my nsc file:
; Undocumented section
; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk = 1; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog = 1; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers = 1; Check NSCP - Checkes the state of the agent
CheckNSCP = 1; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1; CheckWMI - CheckWMI can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckWMI = 1; NRPE server - A simple server that listens for incoming NRPE connection and handles them. NRPE is preferred over NSClient as it is more flexible. You can of cource use both NSClient and NRPE.
NRPEServer = 1; Undocumented section
settings/default
; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges. Parent element can be found under: /settings/default
allowed hosts = 192.168.7.11; Section for NRPE (NRPEListener.dll) (check_nrpe) protocol options. settings/NRPE/server
NRPEListener.dll
NRPEServer.dll; Section for system checks and system settings
settings/check/system/windows; Confiure which services has to be in which state
mapping; Configure crash handling properties.
settings/crash; Section for the EventLog? Checker (CheckEventLog.dll).
settings/eventlog; A set of options to configure the real time checks
settings/eventlog/real-time; A set of filters to use in real-time mode
settings/eventlog/real-time/filters; Section for external scripts configuration options (CheckExternalScripts).
scripts
allow_arguments = 1
allow_nasty_meta_chars = 1
; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
scripts/alias; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
scripts/scripts; A list of wrappped scripts (ie. using the template mechanism)
scripts/wrapped scripts; A list of templates for wrapped scripts
scripts/wrappings; Section for configuring the log handling.
settings/log; Configure log file properties.
settings/log/file; Section for configuring the shared session. session
shared_session = 1
; A list of avalible remote target systems
settings/targetsnetworker_04/05/12 21:15:54 (14 months ago)-
Message #2507
Your problem is the keys should NOT be with underscores (that's the old format)....
A good way to "solve this" is to runt he following command:
nscp settings --generate settings --add-defaults
THat will add all "normal keys" to your settings file correctly with descriptions...
You can (if you do):
nscp settings --help
Get some more details. There are options for generating all keys from all modeuls (default is only modules you have configured) and some other usefull things...
Michael Medin
mickem04/10/12 08:59:12 (14 months ago)
-
-
-
-








