﻿__group__,ticket,summary,component,version,milestone,type,severity,owner,status,created,_changetime,_description,_reporter
CheckDisk Component,435,CheckFile2,CheckDisk,0.3.8,0.4.2,defect,Bugs,mickem,new,2011-02-17T12:08:52+01:00,2012-11-16T07:22:57+01:00,"Following command returns wrong file modified date:

 CheckFile2 -a path=""f:\\windowsimagebackup\\backup"" pattern=*.vhd filter=in filter+written=\<""20h"" syntax=""%filename% was modified %write%"" MinWarn=0 max-dir-depth=1
ee7fd900-a453-11df-a240-0017a477c432.vhd was modified Wednesday, February 16, 2011 18:57:21|'found files'=1;0;0

Actual modified date was 2 hours later.

Is there something wrong with my syntax?",jussi
CheckDisk Component,480,check_nt -v FILEAGE not working on 0.3.9,CheckDisk,0.3.9,0.4.2,defect,Bugs,mickem,new,2011-10-20T15:34:03+02:00,2013-03-19T15:36:29+01:00,"When using the check_nt -v FILEAGE with nsclient version 0.3.9 I always get the message 
Check contains error. Check log for details (or enable show_errors in nsc.ini)

using the following command

check_nt -H hostaddress -p 12489 -v FILEAGE -l ""c:/nagios/nsclient.log"" 

This used to work with version 0.3.8 and older.",m000697
CheckDisk Component,518,CheckFileSize Failing to work on subdirectories,CheckDisk,0.3.9,0.4.2,defect,Bugs,mickem,assigned,2012-04-19T02:42:16+02:00,2012-04-27T13:34:17+02:00,"I have been trying to setup checking for the current size of a directory and found a bug with the command.

If I do this:
{{{
$ ./check_nrpe -H 10.0.0.1 -p 5666 -c CheckFileSize -a ShowAll MinWarn=10G MinCrit=20G File:WIN=d:/scripts/*.*
CRITICAL: WIN: 0B < critical|'WIN'=0B;10737418240;21474836480
}}}


So I switched on the logging option for the nsclient service and found this in the log:
{{{
2012-04-19 10:29:09: error:D:\source\nscp\branches\stable\include\parsers/filter/where_filter_impl.hpp:85: Invalid file specified: d:/scripts/*.*
}}}

but if I do this
{{{
$ ./check_nrpe -H 10.0.0.1 -p 5666 -c CheckFileSize -a ShowAll MaxWarn=1M MaxCrit=2M File:_list=d:/*.*
CRITICAL: _list: 67M > critical|'_list'=66.96M;1;2;
}}}
or this 
{{{
$ ./check_nrpe -H 10.0.0.1 -p 5666 -c CheckFileSize -a ShowAll MinWarn=10G MinCrit=20G File:WIN=d:/scripts/*.sql
CRITICAL: WIN: 2.43K < critical|'WIN'=2.43KB;10485760;20971520
}}}

It works as expected.",marty_one
CheckDisk Component,556,nscapi_core_wrapper.cpp:181: No handler for command 'CheckFileSize',CheckDisk,0.4.0,0.4.2,defect,Bugs,mickem,new,2012-08-30T10:24:52+02:00,2013-03-20T06:57:25+01:00,"Hallo,
we have install the version 0,4,0,183 2012-07-31 and we want to use the CheckFileSize. By the command 
""./check_nrpe -H v0001107 -c CheckFileSize -a ShowAll MinWarn=1048 MaxWarn=4096 File=_win=c:/Programme/UC4/agent/temp/agent_local.l00.txt""

we get the failure ""CHECK_NRPE: No output returned from daemon."" In the nsclient.log we get ""e:..\..\..\..\trunk\include\nscapi\nscapi_core_wrapper.cpp:181: No handler for command 'CheckFileSize'.""
Can you help? What ist wrong? In the nsclient.ini the CheckDisk is on (CheckDisk = 1).

Manuela 30-08-2012",ossmon
CheckDisk Component,594,CheckFiles %total% and %matches% are reversed,CheckDisk,0.4.1,0.4.2,defect,Bugs,mickem,new,2013-01-17T17:29:40+01:00,2013-01-17T17:29:40+01:00,"Seems I have switched the keys around.

{{{
strEx::replace(syntax, _T(""%matches%""), strEx::itos(count_));
strEx::replace(syntax, _T(""%total%""), strEx::itos(match_));
}}}


// Michael Medin",mickem
CheckDisk Component,287,Disk status feature,CheckDisk,0.3.4,0.4.2,enhancement,Feature Requests,mickem,new,2009-03-09T22:02:30+01:00,2012-11-15T22:09:19+01:00,"One thing I'd like to see added to the plugin is a way to check disk status. Not size, but to monitor the redundancy of mirrored drives on a server. Incase one drive in a mirrored pair fails and the drive status changes from ""healthy"" to ""errors"" if the partition is no longer redundant. ",jpauwels@…
CheckDisk Component,210,Drives which are cluster resources.,CheckDisk,0.3.3,0.4.2,enhancement,Feature Requests,mickem,new,2008-07-31T14:22:27+02:00,2012-11-16T06:51:34+01:00,"I wonder if it would be posible to add a feature for how drives on a clustered server are monitored? I would like to be able to ignore cluster disk resources not currently assigned to a node.

We monitor clusters by polling each cluster node for basic windows health (disk space, processor, memory and one or two services) and then poling the cluster resource for resorce specific things (ie. disk space, exchange performance counters, MSSQL services.)

I love being able to check all local disks with one command. I am unable to use this option on cluster nodes as I get the following errors returned for disk resources on the inactive node:

    UNKNOWN: Could not get free space for: F:\ ""F:\"" reason: 87
    UNKNOWN: Could not get free space for: H:\ ""H:\"" reason: 21

There are currently filter options for fixed/cdrom/removable (I note that the removable filter does not work here) A new filter or extension to the existing removable filter would be fantastic.

Thanks again for a great application.

",Matthew
CheckDisk Component,412,combine disk volumes with one threshold for sum of disk space,CheckDisk,0.4.0,0.4.2,enhancement,Feature Requests,mickem,new,2010-10-11T19:53:48+02:00,2012-11-17T11:39:00+01:00,"Hello Michael!

We met on the ""Open Source Monitoring Conference"" at Nürnberg.
I listened to your presentation on NsClient++ and asked you, whether it would be possible to add a feature ""One threshold for an aggregation of disk volumes"" and we aggreed on a feature request.


This is what I would appreciate:
In a windows-System you have a lot of drives, sometimes with a letter, sometimes mounted somewhere in the filesystem.[[BR]]

I would like to check a bunch of these drives with one threshold for ""free space"", counting only those drives with an minimum amount of free space and which ""path-String"" matches one of a number of criteria.


Because I have a ""complex"" idea, I divide it into a core part and some extensions - they ""nice to have"" and less important.




== Core part: ==

Combine a set of drives and / or volumes with one set of thresholds.
For this I need 
- one or more paths to add to the filter criteria[[BR]]
- an extra threshold to exclude free spaces that are too small for use (e.g: 100 partitions with 500MB on it provide 50GB of free space. But they are useless because we need them in parts of 2GB at a minimum. Values may vary.)[[BR]]
- a set of thresholds ""Warning"" and ""critical"".[[BR]]
- Output Performance-Data: ""Bytes used"", perhaps also ""Bytes free"" (GB or other readable modifications are welcome for Volume amounts). We need these data for reporting, especially the first one.[[BR]]



== Additional Part 1 - Exclusion: ==

If we could exclude strings from the path ""search filter"" we could adopt to more complex criteria (like the filter feature at the eventlog checks)



== Additional Part 2 - additional performance counter: ==

A performance counter providing the number of partitions that match the path-criteria would be nice - just for information.



== Additional Part 3 - debug output: ==

Normally it would be best to have short text output, especially in bigger systems. It could be nice to get a list of all matching drives / volumes in a more verbose mode.



== Additional Part 4 - Provide more thresholds to minimize workload: ==

I would like a complex warning threshold of (10GB or 15%) free and a complex critical threshold of (5GB or 10%) free across all data volumes that fulfill the criteria above for each check.[[BR]]
	For each warning or critical in Mode ""free"" if one of the conditions is met it is considered OK.[[BR]]
	In Mode ""used"" it would require both to be OK.[[BR]]
For this I add an Excel-Sheet as an example (because the idea is more complex). Perhaps it works for you. So you can try the thresholds and values -- needed only if you would like to combine the thresholds.[[BR]]
'''--- Why this?'''
We work often with standard thresholds on small and big systems. If we use such a combination, we usually have less work with adapting thresholds in nagios. At this time we use it only with oracle tablespaces - there it works pretty good.





== ### Begin of  EXAMPLE ==

 

To ""paint the picture"" I provide an examples (Core part plus additional part 1 and 4):

System is a database server with two database systems with SIDs ""PRD"" and ""KON"".

The data for PRD resides in drives H: and G: and in Mountpoints G:\DATA\PRD\data6 and G:\DATA\PRD\data7[[BR]]
Here I want to count all partitions with at least 2 GB of free space. Free Spaces that are less are assumed not to exist.

The data for KON resides in drives L: and in Mountpoints G:\DATA\KON\data6 and G:\DATA\KON\data7[[BR]]
Here I want to count all partitions with at least 2 GB of free space. Free Spaces that are less are assumed not to exist.[[BR]]

[[BR]]As a commandline I would appreciate something like this (I appreciate the syntax of your filters, the keywords in the example are not the same - its just an example): 

CheckDriveSize_Cluster [ShowAll] MinWarnFree=10GB MinWarnFreePercent=15% MinCritFree=5GB MinCritFreePercent=10% MinBlockSize=2GB +Drive=L:  +Drive=G:\DATA\KON\data

According to Addition 1:[[BR]]
CheckDriveSize_Cluster [ShowAll] MinWarnFree=10GB MinWarnFree=15% MinCritFree=5GB MinCritFree=10% MinBlockSize=2GB +Drive=H: +Drive=G: -Drive=G:\DATA\KON\




== ### End of  EXAMPLE ==








I would be glad if you would add this feature to NsClient. If I you have any questions, please feel free to ask.
[[BR]]
[[BR]]



Kind regards

Bernd Horn
[[BR]]
[[BR]]
[[BR]]
[[BR]]
Postscriptum:[[BR]]
I just saw the additional links to the wiki to explain words. If you agree to the ""big picture"" I could add them. I think it makes sense only after a discussion (because my wording differs a little bit from the one used in NsClient++).
",einhorn
CheckDisk Component,423,FILEAGE wildcards not working,CheckDisk,0.3.8,0.4.2,defect,Bugs,mickem,new,2010-12-16T09:13:13+01:00,2012-02-16T08:21:07+01:00,"Hello,
since version 0.3.8 wildcards (for example ""?"" or ""*"") are not working any longer. I tried also the latest nightly build 20101214.

Wilcards worked with Version 0.3.7

Greetings
Bernhard",daffy_jr
CheckDisk Component,620,Backslash returned by CheckDisk (CheckAll) prevents data display in graphite,CheckDisk,0.4.1,future,defect,Bugs,mickem,new,2013-04-16T06:41:10+02:00,2013-04-16T06:41:10+02:00,"Using CheckAll for the CheckDriveSize command returns a list of disks with a backslash e.g. C:\, D:\ etc.. When using the Graphite client this causes problems as graphite-web cannot display data with a backslash in the metric name. While this could be an issue with Graphite (indeed someone else has reported this same problem at https://github.com/graphite-project/graphite-web/issues/157), it could also be an issue where NSCP should sanitise it's output.",peterg
CheckDisk Component,39,file-age syntax,CheckDisk,0.2.7,0.4.2,task,Patches,mickem,reopened,2007-03-05T13:20:40+01:00,2012-03-05T23:10:30+01:00,"Hi,

i have some problems with the fileage support and the nightly (NSClient++-20070304-2220). Dunno if it is working with previous versions, i only tested this one.

{{{
./check_nt -H 172.20.100.32 -p 1248 -v FILEAGE -l ""c:\\daten\\access\\warnung.txt"" -w 5 -c 6
}}}

{{{
Thursday, January 01, 1970 00:29:06
}}}

The Time is ""correct"" the file was 29 Minutes old but the rest (year,hour,time) ;)

The main problem is that the tool always result a OK state.
Maybe i make a mistake?


{{{
2007-03-05 12:59:10: debug:.\NSClientListener.cpp:124: Data: None&9&c:\daten\access\warnung.txt
2007-03-05 12:59:10: debug:.\NSClientListener.cpp:149: Data: c:\daten\access\warnung.txt
2007-03-05 12:59:10: debug:.\NSClient++.cpp:370: Injecting: getFileAge: path=c:\daten\access\warnung.txt
2007-03-05 12:59:10: debug:.\NSClient++.cpp:390: Injected Result: OK  --  1749&Thursday, January 01, 1970 00:29:09
2007-03-05 12:59:10: debug:.\NSClient++.cpp:391: Injected Performance Result: 
}}}

",marcel.wiechmann@…
CheckEventlog Component,616,Int variable not bound - Infinite (logging) loop,CheckEventlog,0.4.1,,defect,Bugs,mickem,new,2013-04-10T15:13:26+02:00,2013-04-10T15:13:26+02:00,"I tried executing the check_eventlog handler, check_nrpe timed out and NSClient++ kept spamming the nsclient.log with this text over and over:


{{{
e:D:\source\nscp\trunk\include\parsers/filter/where_filter_impl.hpp:89: Error: Int variable not bound: severity, Int variable not bound: severity
}}}


The size of the log file quickly expanded to hundreds of megabytes.


The command line of the handler looked like this:


{{{
check_nrpe -s -H 192.0.2.50 -c check_eventlog -a file=application MaxWarn=1 MaxCrit=1 ""filter= severity eq 1"" unique ""syntax=%id%: (%count%)""
}}}


''Note: ""severity eq 1"" is incorrect syntax. It should be ""severity eq 'error'"" or something similar. The agent shouldn't behave like this though.''",peklof
CheckEventlog Component,622,CheckEventLog flagging information events as an error,CheckEventlog,0.4.1,,defect,Bugs,mickem,new,2013-04-18T17:23:41+02:00,2013-04-18T17:23:41+02:00,"I'm using nrpe to check the event logs and one particular information message keeps showing up as an error.

Version of NSClient++ on Workstation:
  NSClient++ 0,4,1,73 2012-12-17 

Here's the command-line that returns the error:
 ./check_nrpe -H 10.1.1.33 -c CheckEventLog -a debug=true file=System MaxWarn=1 MaxCrit=5 ""filter=(generated gt -1d) and severity not in ('success','informational','warning')""

Here's what is returned:
EventLog(info, 6013, error)[85878, 60, 420 Mountain Standard Time, ], eventlog: 1 > warning|'eventlog'=1;1;5

Looking at the event it says the following:
  Date: 4/17/2013
  Source: EventLog
  Time: 12:00:01 PM
  Category: None
  Type: Information
  Event ID: 6013
  User: N/A
  Computer: NASSERVER
  Description: The system uptime is 85878 seconds. For more...

I think I've got my script setup correctly to only report errors. Is there possibly a problem in how I'm filtering? Why does the verbose response show up as an 'error'?",mikehansen
CheckExternalScripts Component,614,"Wiki says args in %ARGS%, but in 3.9.307 only $ARGx$ works",CheckExternalScripts,0.3.9,,defect,Bugs,mickem,new,2013-04-05T20:40:00+02:00,2013-04-07T11:39:33+02:00,"This may just be a documentation bug. We found that an arg passed to %ARGS% resulted in the literal ""%ARGS%"" being passed through to the MS SQL query we're doing (with sqlcmd) in the local script. But $ARG1$ passes our arg (from check_nrpe -a ARG on Linux) just fine. ",whit
CheckExternalScripts Component,534,#131 Runas does not work when NSClient runs under Local System Account,CheckExternalScripts,0.4.0,0.4.2,defect,Bugs,mickem,new,2012-06-09T22:02:18+02:00,2012-06-09T22:02:18+02:00,"Hi,

I didn't find a documentation regarding the new runas function from #131, so I might did something wrong.
My sample entry:
[/settings/external scripts/scripts/check_something]
command=cmd /c ""dir c:\""
user=test_user
password=testpassword

OS: W2k3
The password is correct, if I use the wrong password I get this error message:
ExternalCommands: failed to create process (cmd /c dir c:""): 1326: Logon failure: unknown user name or bad password.

But with the correct password the following message is shown.
ExternalCommands: failed to create process (cmd /c dir c:""): 5: Access is denied.
The problem occurs with every command.
I think it is the same problem as the PSExec return code 5 problem described here: http://forum.sysinternals.com/psexec-error-code-5_topic20674.html (""Windows XP with SP2 and Windows Server 2003:  You cannot call CreateProcessWithLogonW from a process that is running under the ""LocalSystem"" account, because the function uses the logon SID in the caller token, and the token for the ""LocalSystem"" account does not contain this SID. As an alternative, use the CreateProcessAsUser and LogonUser functions."")

Everything works if I run ""nscp test"", because it runs in a different (non system account) user context.
",mopp
CheckSystem Component,634,Windows counter issue on windows 2008 server R2 in french language,CheckSystem,0.4.1,,defect,Bugs,mickem,new,2013-05-13T14:55:29+02:00,2013-05-13T14:55:29+02:00," Hello,

We have a problem to supervise the Windows counters. We try to supervise windows counter on disk control point to identify bottleneck on I/O.

We added the following alias in the nsc.ini file :

{{{
alias_w2k8_disk_avg_dataqueue_length = CheckCounter ""Counter:disk_avg_dataqueue_length=\Disque logique($ARG1$)\Longueur moyenne de file d'attente du disque"" ShowAll MaxWarn=$ARG2$ MaxCrit=$ARG3$
}}}

All servers are installed in French language.

The performance counter contain a character :
{{{
'
}}}

The command : 

{{{
nscp client --module CheckSystem --exec listpdh
}}}

Return nothing. And the command :


{{{
nscp sys --list --all
}}}

Return the following result :


{{{
Listing counters
---------------------------
\Compteurs des services de base de module de plateforme sécurisée\Ressources actuelles
\Compteurs des services de base de module de plateforme sécurisée\Contextes actuels
\Statistiques des quotas WSMan(C:\Windows\system32\svchost.exe -k NetworkService)\Utilisateurs actifs
\Statistiques des quotas WSMan(C:\Windows\system32\svchost.exe -k NetworkService)\Opérations actives
\Statistiques des quotas WSMan(C:\Windows\system32\svchost.exe -k NetworkService)\Shells actifs
\Statistiques des quotas WSMan(C:\Windows\system32\svchost.exe -k NetworkService)\Violations de quota système/seconde
\Statistiques des quotas WSMan(C:\Windows\system32\svchost.exe -k NetworkService)\Violations de quota d
}}}

The result is truncate when appears the first symbol '.

Could you help us?

Cdt,
Philippe C.

",pca-cpf
CheckSystem Component,536,PDHCollector.cpp:148 2008 R2 Enterprise 64 bit,CheckSystem,0.4.0,0.4.1,defect,Bugs,mickem,reopened,2012-06-12T18:00:39+02:00,2013-04-02T11:30:13+02:00,"After a default install of NSCP 4.0.172 an error is continually written to the log file about every second.

2012.06.12 11:56:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:148: Failed to query performance counters: \238(_total)\6: PdhGetFormattedCounterValue failed {format: 1024}: -2147481642: A counter with a negative denominator value was detected.

I tried to find a solution on discussions but reset wbem and reloading counters did not work. Tried changing the CPU counter definition just to see if anything happened but still same result

2012.06.12 11:50:34: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:148: Failed to query performance counters: \Processor(_Total)\% Processor Time: PdhGetFormattedCounterValue failed {format: 1024}: -2147481642: A counter with a negative denominator value was detected.
",rrspyder
CheckSystem Component,336,Counters with big values,CheckSystem,0.3.7,0.4.2,defect,Bugs,mickem,new,2009-10-31T20:31:08+01:00,2012-11-17T15:05:27+01:00,"Here is the log when I try to read out the available storage memory:
{{{
2009-10-31 20:00:21: debug:modules\NSClientListener\NSClientListener.cpp:146: Data: None&8&\DataCore NMV Pool(_Total)\Megabytes Available
2009-10-31 20:00:21: debug:modules\NSClientListener\NSClientListener.cpp:171: Data: \DataCore NMV Pool(_Total)\Megabytes Available
2009-10-31 20:00:21: debug:NSClient++.cpp:1073: Injecting: checkCounter: Counter=\DataCore NMV Pool(_Total)\Megabytes Available, nsclient
2009-10-31 20:00:22: debug:NSClient++.cpp:1109: Injected Result: OK '1.98142e+006'
2009-10-31 20:00:22: debug:NSClient++.cpp:1110: Injected Performance Result: ''
2009-10-31 20:01:31: debug:modules\NSClientListener\NSClientListener.cpp:146: Data: None&5&ShowAll&DcsStart
2009-10-31 20:01:31: debug:modules\NSClientListener\NSClientListener.cpp:171: Data: ShowAll&DcsStart
2009-10-31 20:01:31: debug:NSClient++.cpp:1073: Injecting: checkServiceState: ShowAll, DcsStart, nsclient
2009-10-31 20:01:31: debug:NSClient++.cpp:1109: Injected Result: OK 'DcsStart: Started'
2009-10-31 20:01:31: debug:NSClient++.cpp:1110: Injected Performance Result: ''
2009-10-31 20:01:32: debug:modules\NSClientListener\NSClientListener.cpp:146: Data: None&8&\DataCore NMV Pool(_Total)\Megabytes Total
2009-10-31 20:01:32: debug:modules\NSClientListener\NSClientListener.cpp:171: Data: \DataCore NMV Pool(_Total)\Megabytes Total
2009-10-31 20:01:32: debug:NSClient++.cpp:1073: Injecting: checkCounter: Counter=\DataCore NMV Pool(_Total)\Megabytes Total, nsclient
2009-10-31 20:01:33: debug:NSClient++.cpp:1109: Injected Result: OK '4.19404e+006'

on the check_nt I only get ""1"" or ""4"" -> Full Terrabytes - not handy for monitoring ;) x,xxx,xxx.xx or even more would be nice to monitor a e.g. SAN MELODY Datacore Storage Pool
}}}",NaraKosh
CheckSystem Component,434,CheckFiles and  checkServiceState,CheckSystem,0.3.9,0.4.2,defect,Bugs,mickem,new,2011-02-15T13:38:49+01:00,2012-07-12T13:23:09+02:00,"I tried nsclient++32_0.3.9.852.zip on W2K SP3 instead of the 0.3.8, because i wanted to try CheckFiles (line_count).
Part of my nsc.ini (which works fine on 0.3.8:
[...]
[NSCA Commands]
'''my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService exclude=MMCSS exclude=sppsvc exclude=uvnc_service  exclude=SysmonLog exclude=AutoExNT
my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
my_mem_check=checkMem MaxWarn=80% MaxCrit=90% type=page ShowAll=long	
my_drivesize_check_c=CheckDriveSize Drive=C Drive=D ShowAll=long MinWarnFree=10% MinCritFree=5%
my_eventlog_check=CheckEventLog file=application debug=true MaxWarn=100 MaxCrit=100 ""filter=id = 1008"" truncate=800 unique descriptions ""syntax=%source% %id%: (%count%)""'''
[...]
which may be not the best but it works and i'm still learning ...
I added the line
[...]
'''my_update_check=CheckFiles ""filter=line_count > 11"" ""syntax=%filename%: %line_count%"" ""path=c:\Program Files\nsclient++32\update.log"" MaxCrit=1'''
[...]
for controlling an (un)succesfull Updateprocess on our Antivirusserver (if there was an Error - there is one line more in the checjed file)
While testing it in the Windows-Konsole (DOS-Box) everthing seems to work fine - BUT the results of checkServiceState or CheckFiles but Nagios doesn't see that - syslog just shows checkmem, checkcpu, checkdrivesize, ... BUT NOT Checkfiles CheckServiceState.
Okay after more testing -  '''sometimes''' ONE CheckFiles result is send successfull
local:
{{{
Launching test mode - client mode
d NSClient++.cpp(1216) Enabling debug mode...
d NSClient++.cpp(557) Attempting to start NSCLient++ - 0.3.9.265 2011-02-11
NSCore not loaded...
Archiving crash dumps in: C:\Documents and Settings\<user>\Local Settings\Application Data\NSClient++\crash dumps
d NSClient++.cpp(1007) Loading plugin: CheckDisk...
d NSClient++.cpp(1007) Loading plugin: Event log Checker....
d NSClient++.cpp(1007) Loading plugin: Helper function...
d NSClient++.cpp(1007) Loading plugin: CheckSystem...
d NSClient++.cpp(1007) Loading plugin: CheckWMI...
d NSClient++.cpp(1007) Loading plugin: File logger...
d \PDHCollector.cpp(73) Autodetected w2k or later, using w2k PDH counters.
d \PDHCollector.cpp(110) Using index to retrive counternames
l \FileLogger.cpp(87) Log path is: C:\Program Files\nsclient++32\\nsclient.log
d NSClient++.cpp(1007) Loading plugin: NRPE server (w/ SSL)...
d \NRPEListener.cpp(92) Loading all commands (from NRPE)
d \NRPEListener.cpp(122) Starting NRPE socket...
d NSClient++.cpp(1007) Loading plugin: NSCAAgent (w/ encryption)...
d \NSCAThread.cpp(77) Time difference for NSCA server is: 0
d \Socket.h(683) Bound to: 0.0.0.0:5666
d \NSCAThread.cpp(87) Only reporting: ok,warning,critical,unknown
d NSClient++.cpp(1007) Loading plugin: NSClient server...
d \NSCAThread.cpp(188) Drifting: 0
d \PDHCollector.cpp(130) Found countername: CPU:    \Processor(_total)\% Processor Time
d \PDHCollector.cpp(131) Found countername: UPTIME: \System\System Up Time
d \PDHCollector.cpp(132) Found countername: MCL:    \Memory\Commit Limit
d \PDHCollector.cpp(133) Found countername: MCB:    \Memory\Committed Bytes
d NSClient++.cpp(709) NSCLient++ - 0.3.9.265 2011-02-11 Started!
d \Socket.h(683) Bound to: 0.0.0.0:12489
l NSClient++.cpp(461) Using settings from: INI-file
l NSClient++.cpp(462) Enter command to inject or exit to terminate...
d \NSCAThread.cpp(206) Executing (from NSCA): my_cpu_check
d NSClient++.cpp(1144) Injecting: checkCPU: warn=80, crit=90, time=20m, time=10s, time=4
d NSClient++.cpp(1180) Injected Result: OK 'OK CPU Load ok.'
d NSClient++.cpp(1181) Injected Performance Result: ''20m'=0%;80;90 '10s'=1%;80;90 '4'=0%;80;90'
d \NSCAThread.cpp(206) Executing (from NSCA): my_drivesize_check_c
d NSClient++.cpp(1144) Injecting: CheckDriveSize: Drive=C, Drive=D, ShowAll=long, MinWarnFree=10%, MinCritFree=5%
d NSClient++.cpp(1180) Injected Result: OK 'OK: C:: Total: 33.9G - Used: 14.5G (42%) - Free: 19.4G (58%), D:: Total: 68.3G - Used: 5.57G (8%) - Free: 62.8G (92%)'
d NSClient++.cpp(1181) Injected Performance Result: ''C: %'=58%;10;5 'C:'=14.45GB;3.38;1.69;0;33.87 'D: %'=92%;10;5 'D:'=5.57GB;2.83;3.41;0;68.3'
d \NSCAThread.cpp(206) Executing (from NSCA): my_eventlog_check
d NSClient++.cpp(1144) Injecting: CheckEventLog: file=application, debug=true, MaxWarn=100, MaxCrit=100, filter=id = 1008, truncate=800, unique, descriptions, syntax=%source% %id%: (%count%)
d \CheckEventLog.cpp(728) Filter: 
d \CheckEventLog.cpp(750) Using: where id = 1008
d \CheckEventLog.cpp(467) Parsing: id = 1008
d \CheckEventLog.cpp(475) Parsing succeeded: {tbd}op:=({tbd}:id, {tbd}#1008)
d \CheckEventLog.cpp(482) Type resolution succeeded: {bool}op:=({int}:id, {int}#1008)
d \CheckEventLog.cpp(489) Binding succeeded: {bool}op:=({int}:id, {int}#1008)
d \CheckEventLog.cpp(496) Static evaluation succeeded: {bool}op:=({int}:id, {int}#1008)
d \CheckEventLog.cpp(757) Boot time: 150
d \CheckEventLog.cpp(541) Attempting to match: Application with application
d \CheckEventLog.cpp(541) Attempting to match: Security with application
d \CheckEventLog.cpp(541) Attempting to match: System with application
d \CheckEventLog.cpp(850) Evaluation time: 2030
d NSClient++.cpp(1180) Injected Result: OK 'Eventlog check ok'
d NSClient++.cpp(1181) Injected Performance Result: ''eventlog'=0;100;100'
d \NSCAThread.cpp(206) Executing (from NSCA): my_mem_check
d NSClient++.cpp(1144) Injecting: checkMem: MaxWarn=80%, MaxCrit=90%, type=page, ShowAll=long
d NSClient++.cpp(1180) Injected Result: OK 'OK: page file: Total: 9.82G - Used: 2.16G (21%) - Free: 7.66G (79%)'
d NSClient++.cpp(1181) Injected Performance Result: ''page file %'=21%;80;90 'page file'=2208.04MB;3945.88;855.11;0;10052.35'
d \NSCAThread.cpp(206) Executing (from NSCA): my_svc_check
d NSClient++.cpp(1144) Injecting: checkServiceState: CheckAll, exclude=wampmysqld, exclude=MpfService, exclude=MMCSS, exclude=sppsvc, exclude=uvnc_service, exclude=SysmonLog, exclude=AutoExNT
d NSClient++.cpp(1180) Injected Result: OK 'OK: All services are in their appropriate state.'
d NSClient++.cpp(1181) Injected Performance Result: ''
d \NSCAThread.cpp(206) Executing (from NSCA): my_update_check
d NSClient++.cpp(1144) Injecting: CheckFiles: filter=line_count > 4, syntax=%filename%: %line_count%, path=c:\Program Files\nsclient++32\update.log, MaxCrit=1
d NSClient++.cpp(1180) Injected Result: OK 'CheckFile ok'
d NSClient++.cpp(1181) Injected Performance Result: ''found files'=0;0;1'
d \NSCAThread.cpp(206) Executing (from NSCA): my_uptime_check
d NSClient++.cpp(1144) Injecting: CheckUpTime: MinWarn=1d, MinCrit=1200h
d NSClient++.cpp(1180) Injected Result: CRITICAL 'CRITICAL: uptime: 1d 2:14 < critical'
d NSClient++.cpp(1181) Injected Performance Result: ''uptime'=94472000;86400000;4320000000'
d \NSCAThread.cpp(272) Sending to server...
d \NSCAThread.cpp(279) Looked up <fqn> to <ip>
d \NSCAThread.cpp(355) Finnished sending to server...
}}}

Nagios
{{{
<fqn>2:~# tail -f /var/log/syslog | grep <fqn>1
Feb 15 13:12:00 <fqn>2 nsca[15204]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=0%;80;90 '4'=0%;80;90'
Feb 15 13:12:00 <fqn>2 nsca[15204]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_drivesize_check_c', Return Code: '0', Output: 'OK: C:: Total: 33.9G - Used: 14.5G (42%) - Free: 19.4G (58%), D:: Total: 68.3G - Used: 5.57G (8%) - Free: 62.8G (92%)|'C: %'=58%;10;5 'C:'=14.45GB;3.38;1.69;0;33.87 'D: %'=92%;10;5 'D:'=5.57GB;2.83;3.41;0;68.3'
Feb 15 13:12:00 <fqn>2 nsca[15204]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_eventlog_check', Return Code: '0', Output: 'Eventlog check ok|'eventlog'=0;100;100'
Feb 15 13:12:00 <fqn>2 nsca[15204]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_mem_check', Return Code: '0', Output: 'OK: page file: Total: 9.82G - Used: 2.15G (21%) - Free: 7.66G (79%)|'page file %'=21%;80;90 'page file'=2204.52MB;3945.88;855.11;0;10052.35'
Feb 15 13:13:39 <fqn>2 nsca[19972]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=3%;80;90 '4'=0%;80;90'
Feb 15 13:13:39 <fqn>2 nsca[19972]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_drivesize_check_c', Return Code: '0', Output: 'OK: C:: Total: 33.9G - Used: 14.5G (42%) - Free: 19.4G (58%), D:: Total: 68.3G - Used: 5.57G (8%) - Free: 62.8G (92%)|'C: %'=58%;10;5 'C:'=14.45GB;3.38;1.69;0;33.87 'D: %'=92%;10;5 'D:'=5.57GB;2.83;3.41;0;68.3'
Feb 15 13:13:39 <fqn>2 nsca[19972]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_eventlog_check', Return Code: '0', Output: 'Eventlog check ok|'eventlog'=0;100;100'
Feb 15 13:13:39 <fqn>2 nsca[19972]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_mem_check', Return Code: '0', Output: 'OK: page file: Total: 9.82G - Used: 2.16G (22%) - Free: 7.66G (78%)|'page file %'=22%;80;90 'page file'=2211.62MB;3945.88;855.11;0;10052.35'
Feb 15 13:14:48 <fqn>2 nsca[23268]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_cpu_check', Return Code: '0', Output: 'OK CPU Load ok.|'20m'=0%;80;90 '10s'=1%;80;90 '4'=0%;80;90'
Feb 15 13:14:48 <fqn>2 nsca[23268]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_drivesize_check_c', Return Code: '0', Output: 'OK: C:: Total: 33.9G - Used: 14.5G (42%) - Free: 19.4G (58%), D:: Total: 68.3G - Used: 5.57G (8%) - Free: 62.8G (92%)|'C: %'=58%;10;5 'C:'=14.45GB;3.38;1.69;0;33.87 'D: %'=92%;10;5 'D:'=5.57GB;2.83;3.41;0;68.3'
Feb 15 13:14:48 <fqn>2 nsca[23268]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_eventlog_check', Return Code: '0', Output: 'Eventlog check ok|'eventlog'=0;100;100'
Feb 15 13:14:48 <fqn>2 nsca[23268]: SERVICE CHECK -> Host Name: '<fqn>1.<fqn_the rest>', Service Description: 'my_mem_check', Return Code: '0', Output: 'OK: page file: Total: 9.82G - Used: 2.16G (21%) - Free: 7.66G (79%)|'page file %'=21%;80;90 'page file'=2208.04MB;3945.88;855.11;0;10052.35'
}}}
",Bin-Bash
CheckSystem Component,448,English Performance Counters,CheckSystem,0.3.9,0.4.2,enhancement,Bugs,mickem,new,2011-04-29T12:27:59+02:00,2012-11-17T08:13:27+01:00,"Using performance counters on a non-english machine isn't fun, caused by the charset issues. Starting with vista/2008, PdhAddEnglishCounter is supported. 

I suggest to use PdhAddCounter first, then (if supported on the platform) try PdhAddEnglishCounter second.",andy_p
CheckSystem Component,464,nsclient++ 0.3.8 and 0.3.9rc3 crash on exchange server.,CheckSystem,0.3.9,0.4.2,defect,Bugs,mickem,new,2011-06-27T12:39:18+02:00,2012-11-17T14:51:40+01:00,"Hello,
this began happening very often, we monitor a large number of performance counter on a windows 2008 64bits exchange 2010. 

the nsclient crashes and we found this on the log: 

{{{
011-06-24 00:05:28: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeAB\NSPI RPC Requests Average Latency|\MSExchangeAB\NSPI RPC Requests Average Latency)
2011-06-24 00:05:28: debug:NSClient++.cpp:1180: Injected Result: WARNING 'ERROR: Failed to get mutex for PdhValidatePath (\MSExchangeAB\NSPI RPC Requests Average Latency|\MSExchangeAB\NSPI RPC Requests Average Latency)'
2011-06-24 00:05:28: debug:NSClient++.cpp:1181: Injected Performance Result: ''
}}}
then the nsclient service stops. 
the event viewer has this: 
{{{
Log Name:      Application
Source:        Application Error
Date:          26/06/2011 23:59:52
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      MAILSRV-01.snba.be
Description:
Faulting application name: nsclient++.exe, version: 0.0.0.0, time stamp: 0x4df77982
Faulting module name: CheckSystem.dll, version: 0.0.0.0, time stamp: 0x4df77a0d
Exception code: 0x40000015
Fault offset: 0x00000000000be22e
Faulting process id: 0x26e4
Faulting application start time: 0x01cc344c51c5cf27
Faulting application path: C:\Program Files\NSClient++\nsclient++.exe
Faulting module path: C:\Program Files\NSClient++\modules\CheckSystem.dll
Report Id: 9dbe14a7-a03f-11e0-8ea3-005056aa19a5
Event Xml:
<Event xmlns=""http://schemas.microsoft.com/win/2004/08/events/event"">
  <System>
    <Provider Name=""Application Error"" />
    <EventID Qualifiers=""0"">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime=""2011-06-26T21:59:52.000000000Z"" />
    <EventRecordID>225116</EventRecordID>
    <Channel>Application</Channel>
    <Computer>MAILSRV-01.snba.be</Computer>
    <Security />
  </System>
  <EventData>
    <Data>nsclient++.exe</Data>
    <Data>0.0.0.0</Data>
    <Data>4df77982</Data>
    <Data>CheckSystem.dll</Data>
    <Data>0.0.0.0</Data>
    <Data>4df77a0d</Data>
    <Data>40000015</Data>
    <Data>00000000000be22e</Data>
    <Data>26e4</Data>
    <Data>01cc344c51c5cf27</Data>
    <Data>C:\Program Files\NSClient++\nsclient++.exe</Data>
    <Data>C:\Program Files\NSClient++\modules\CheckSystem.dll</Data>
    <Data>9dbe14a7-a03f-11e0-8ea3-005056aa19a5</Data>
  </EventData>
</Event>
}}}",mariog
CheckSystem Component,472,CheckServiceState CheckAll does not check every service,CheckSystem,0.3.9,0.4.2,defect,Bugs,mickem,new,2011-08-08T15:05:44+02:00,2013-03-20T06:53:15+01:00,"Hi,

on my german Windows 2008 R2 there is an service named ""Windows Update"" which is automatically started (delayed). If i stop this service it is not reported as stopped. This behaviour is reproducable in nsclient version 0.3.8 and 0.3.9 (64Bit).

Peter",pklaffehn
CheckSystem Component,507,Bug in CheckServiceState,CheckSystem,0.3.9,0.4.2,defect,Bugs,mickem,new,2012-02-14T15:18:22+01:00,2012-11-17T11:05:46+01:00,"Hi,

I check on severals servers windows services state with check_nrpe and CheckServiceState.

check_nrpe -t 30 -H SERVER -c CheckServiceState -a DNSSERVER (for exemple)

Sometime, I have a service which stay in starting state.
The return code was OK, it's not a good thing because I was unable to see that the service was not running
",mcouvran
CheckSystem Component,545,CheckServiceState and CheckProcState unable to recognize certain services,CheckSystem,0.3.9,0.4.2,defect,Bugs,mickem,new,2012-07-11T21:51:48+02:00,2012-11-17T11:08:45+01:00,"I am having trouble getting check_nt to recognize non-default windows services.

It works for Automatic Updates (wuauserv).

It does not work for certain custom services. One example of the service short name is `BlueBoxNotificationSummaryEmailEngine` (underlying process is `NotificationSummaryEmailEngine`.exe). I suspect it might be related to the length of the service/process.

I have tried all of the following:

{{{
/usr/lib/nagios/plugins/check_nt -H 10.1.2.111 -v PROCSTATE -d SHOWALL -l NotificationSummaryEmailEngine.exe -p 12489
}}}

`NotificationSummaryEmailEngine.exe`: not running

{{{
/usr/lib/nagios/plugins/check_nt -H 10.1.2.111 -v SERVICESTATE -d SHOWALL -l BlueBoxNotificationSummaryEmailEngine -p 12489
}}}

`BlueBoxNotificationSummaryEmailEngine`: Not found

{{{
/usr/lib/nagios/plugins/check_nrpe -H 10.1.2.111 -p 5666 -c CheckServiceState -a ShowAll BlueBoxNotificationSummaryEmailEngine
}}}

CRITICAL: `BlueBoxNotificationSummaryEmailEngine`: not found (critical)
",mvazirani
CheckSystem Component,574,nscp-0.4.1.66-x64.msi on Windows 2008 R2 on ESXi 5.0,CheckSystem,0.4.0,0.4.2,defect,Bugs,mickem,new,2012-11-20T12:04:42+01:00,2012-11-20T12:18:56+01:00,"Logfile of over 120 MByte in 10 hours :
...
2012-11-20 10:28:01: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.

2012-11-20 10:28:01: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.

2012-11-20 10:28:01: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.

2012-11-20 10:28:01: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.

2012-11-20 10:28:02: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:13
9: Failed to query performance counters: PdhCollectQueryData failed: : -21474816
43: No data to return.",fgnexus
CheckSystem Component,625,service check on Windows 2012,CheckSystem,0.4.1,0.4.2,defect,Bugs,mickem,new,2013-04-24T22:04:55+02:00,2013-04-25T05:50:54+02:00,"Hello,

on Windows Server 2008 R1 and above, Windows Services, while in  automatic mode can be based on trigger only, like the remote registry.

Do you think you can manage these type of service ?

in registry, for these services:
start=2
Type=32

other impacted services:
Software protection
Group policy client
DNS client

official article:
http://blogs.msdn.com/b/philpenn/archive/2009/07/19/trigger-start-services-with-windows-server-2008-r2.aspx",mchateau
CheckSystem Component,215,Modify Regexp Count,CheckSystem,0.3.9,0.4.2,enhancement,Feature Requests,mickem,new,2008-08-11T18:03:44+02:00,2012-11-15T22:09:45+01:00,"mickem,

A few months ago, you helped me resolve a bug with regexp and it's been working great since. Thanks for all of your help.

I was wondering if I could make a request to modify the way NSCPP handles item counts when using regexp expressions.

Currently, if I run a Nagios command such as

{{{check_nrpe!checkProcState -a match=regexp MinCritCount=2 ShowAll GICSInbound.*}}}

to check for processes GICSInbound.exe and GICSInboundSOS.exe, NSCPP will return false critical since it is looking for two running instances of GICSInbound and GICSInboundSOS (when only one of each are running), instead of two instances of the regular expression GICSInbound.*

In my opinion, the count parameter should count regexp instance matches rather than apply the count to each regexp match.

Just a thought - this would help immensely since it works as a great shortcut if you have multiple processes with a similar prefix or suffix (don't need to make as many service object definitions in Nagios configuration). Also, regexp works as a good workaround for boxes which truncate process names with more than 15 characters due to NetBIOS limitation.

You do great work, much appreciated.

-Mark",big-byrd
CheckSystem Component,262,Display name in CheckServiceStat,CheckSystem,0.3.4,0.4.2,enhancement,Feature Requests,mickem,new,2008-12-08T14:33:06+01:00,2012-11-15T22:10:15+01:00,"Hi!

In the [http://trac.nakednuns.org/nscp/wiki/CheckServiceState CheckServiceStat] it can be confusing to find and fix the correct service without the __Display name__ of the service.
Today the client are returing the __Service name__ and not __Display name__ when a service is running or not. What about adding a argument for returning Service name vs. Display name?

AOS50$02 -> ""Dynamics AX Object Server 5.0$02-Test""",marius.ensrud@…
CheckSystem Component,398,add wildcard pattern matching to CheckServiceState,CheckSystem,0.3.7,0.4.2,enhancement,Feature Requests,mickem,new,2010-07-27T20:31:09+02:00,2012-11-15T23:35:20+01:00,"reference: http://www.nsclient.org/nscp/discussion/topic/619

-----------------------

I have a bunch of services that are named in a similar fashion:

DSM SA Connection Service DSM SA Data Manager DSM SA Event Manager DSM SA Shared Services

I'd like to check that they're all running. I'd prefer to one one check do this without explicitly naming each service.

Is it possible to use wildcards or regex to do this?

for example:

alias_check_dsm=CheckServiceState ShowAll DSM*=running ",oddboy
CheckSystem Component,280,Add option to checkcounter to output only counter value,CheckSystem,0.3.4,future,enhancement,Feature Requests,mickem,new,2009-02-12T15:05:30+01:00,2012-02-16T20:09:47+01:00,"So instead of: OK: \PhysicalDisk?(_Total)\Disk Read Bytes/sec: 4.59211e+006

Just output: 4.59211e+006

This would make it easier to write scripts for other systems that use check_nrpe as a data source. We would not have to parse the output to remove the unneeded text.  I.E. Cacti.",Mike F
CheckSystem Component,380,CheckProcState - extend with CPU & memory usages,CheckSystem,0.3.7,future,enhancement,Feature Requests,mickem,new,2010-05-26T13:30:42+02:00,2012-02-14T14:21:04+01:00,"Hi,

It would be interesting to extend the functionnalities provided by CheckProcState, with the total/average cpu/memory usages for the matched process(es). It's indeed very useful when looking for process memory leak, or simply to keep resource usages for a particular process (via the performance data).

I currently use a modified version of the check_snmp_process plugin from Manubulon. However, this is the last kind of checks that I do without NSClient++ (via snmp).

Exemple of output:

Status Information:
	1 process matching nsclient (> 0), Mem: 8.8Mb OK, Cpu: 0% OK
Performance Data:
	Ramused=9203712o CpuUsed=0.0398671096345515 nbProcess=1

Regards,

Yannick",Tontonitch
CheckSystem Component,466,Check how much memory a process is using,CheckSystem,0.3.9,future,defect,Feature Requests,mickem,new,2011-06-29T10:27:28+02:00,2012-02-14T14:05:35+01:00,"Please create a check_procmem within CheckSystem to allow for checking on how much memory a process is using

Thanks",opsview_duncs
CheckSystem Component,326,CheckCounter on 64 Bit Windows 2008 not showing all Counters,CheckSystem,0.3.6,0.4.2,defect,Bugs,mickem,new,2009-08-31T11:26:50+02:00,2012-11-17T15:04:57+01:00,"Hi,

I already posted it in theo forum, to look if other people face the same problem. http://nsclient.org/nscp/discussion/topic/441

I open tis bug now, since I got no response in the forum.

I installed the current NSClient 64 Bit version (0.3.6) on a 64 Bit Windows 2008 server. All is working fine so far.

Now I tried to read some counters with the checkcounter command. But I only see some standard Windows counter, not all counters which are listed under perfmon. I tried ""nsclient++ CheckSystem listpdh"" to see what counters I can get. 

There are also 2 versions of perfmon under windows, and only the 64 Bit Version shows all counters, the 32 bit Versions shows the same counters as NSClient.",odin
CheckSystem Component,250,"CheckMultiple, user defined labels",CheckSystem,0.3.4,0.4.2,enhancement,Feature Requests,mickem,new,2008-10-22T12:05:20+02:00,2012-11-15T22:17:19+01:00,"I use CheckMultiple to do several basic checks in one go. The command i use and the output it returns in nagios is below. Uptime and page file have a clear beginning in the output but other commands are not so clear. Is there a way (a caption or label argument of some sort) i can pass to CheckMultiple so that i can make my output more readable?

Your response in the forum was right on the money.
In this case you would want a label like maybe so:
... command:MEM=checkMem ... command:CPU=checkcpu ...
and the result would be:
MEM=OK.... ,CPU=OK: 15m: average load 0%, 5m: average load 0%

thanks in advance,

check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMultiple -a command=CheckVersion command=CheckUpTime ShowAll command=CheckMeM MaxWarn=80% MaxCrit=90% type=page ShowAll=long command=CheckCPU warn=80% crit=90% time=15m time=5m time=30s ShowAll=long command=CheckDriveSize MinWarnFree?=10% MinCritFree?=5% ShowAll=long CheckAll? FilterType?=FIXED

0.3.4.32 2008-09-18, OK: uptime: 6d 23:28, OK: page file: Total: 5.83G - Used: 184M (3%) - Free: 5.65G (97%), OK: 15m: average load 0%, 5m: average load 0%, 30s: average load 0%, OK: C:: Total: 12G - Used: 4.89G (40%) - Free: 7.11G (60%), D:: Total: 941G - Used: 30.7G (3%) - Free: 910G (97%)


",JVC
CheckSystem Component,593,"NSClient++ Help (#1) - ""nscp client -q checkCPU"" crashes ? (#1120)",CheckSystem,0.4.1,,defect,Bugs,mickem,reopened,2013-01-07T17:57:29+01:00,2013-01-14T13:12:43+01:00,"I tried to query the nsclient++ (NSCP-0.4.1.73-x64, W2k8R2-de) using the following command which crashes:

{{{

C:\Program Files\NSClient++>nscp client -q check_cpu time=5m MaxWarn=80
IDetected crash...
IRunning: ""C:\Program Files\NSClient++\reporter.exe"" ""archive""  C:\Users\jgast\AppData\Local\Temp\\dab4a5f7-8aa4-4737-b5be-291776e4c766.dmp"" ""NSClient++"" ""0,4,1,73"" ""2012-12-17"" ""C:/Program Files/NSClient++//crash-dumps""
IRunning: ""C:\Program Files\NSClient++\reporter.exe"" ""restart"" ""NSClientpp""

}}}

For more information please refer to
http://nsclient.org/nscp/discussion/topic/1120#topic
",danny70437
CheckSystem Component,561,Comma in counters,CheckSystem,0.4.0,0.4.2,defect,Bugs,mickem,new,2012-10-09T04:26:51+02:00,2012-10-11T09:48:13+02:00,"Hello.
When checking the network adapter with the command check_nt, I get an error. The problem due to a comma in the name of the counter.
# ./check_nt -H 192.168.164.24 -p 12489 -s Ctrhtn+* -v COUNTER -l ""\Network Interface(Marvell Yukon Gigabit Ethernet 10_100_1000Base-T Adapter, Copper RJ-45 - Teefer2 Miniport)\Bytes Received/sec""

# nsclient.log
2012-10-09 11:12:54: e:..\..\..\..\trunk\modules\CheckSystem\CheckSystem.cpp:1351: ERROR: \Network Interface(Marvell Yukon Gigabit Ethernet 10_100_1000Base-T Adapter: PdhAddCounter failed: -1073738816: Unable to parse the counter path. Check the format and syntax of the specified path.

I tried to insert slash before comma, but it didn't help. What to do?
# ./check_nt -H 192.168.164.24 -p 12489 -s Ctrhtn+* -v COUNTER -l ""\Network Interface(Marvell Yukon Gigabit Ethernet 10_100_1000Base-T Adapter\, Copper RJ-45 - Teefer2 Miniport)\Bytes Received/sec""
No unit counter specified

# nsclient.log
2012-10-09 11:19:19: e:..\..\..\..\trunk\modules\CheckSystem\CheckSystem.cpp:1351: ERROR: \Network Interface(Marvell Yukon Gigabit Ethernet 10_100_1000Base-T Adapter\: PdhAddCounter failed: -1073738824: The specified object is not found on the system.

# ./check_nt -H 192.168.164.24 -p 12489 -s Ctrhtn+* -v CLIENTVERSION
NSClient++ 0,4,0,183 2012-07-31",hermit
CheckSystem Component,422,CheckSystem request.,CheckSystem,0.3.8,future,enhancement,Feature Requests,mickem,new,2010-12-03T05:04:56+01:00,2012-02-14T14:13:28+01:00,"Hi Michael

First, let me say thanks for your efforts with NSClient. -I don't know how I could monitor Windows servers with it.

I have two requests relating to CPU and processes for your consideration.

1. CheckCPU
Is it possible to state the top three procs consuming CPU at the time of the test? So instead of ""5m: average load 99% "" we might see something like this:

""5m: average load 99%. -ProcABC 74%, ProcDEF 10%, ProcGHI 2%.""

I have a team in my organisation who don't know what is causing high CPU utilisation and don't get to the server fast enough to check when overall CPU utilisation goes high. I was thinking outputing the top three processes will allow us to go through the Nagios logs and find the offending process.

2. CheckProcState
Is it possible to include an option that checks the CPU utilisation of a specific process?

Once we know which process is consuming CPU (from request #1) we could put utilisation thresholds on the specific process and then graph its performance data.

Once again, thanks for your great work.

Stel",steliop
CheckWMI Component,572,CheckWMI Output Enhancement,CheckWMI,0.4.1-nightly,0.4.2,enhancement,Feature Requests,mickem,new,2012-11-14T19:09:58+01:00,2012-11-14T20:50:32+01:00,"Hi Michael,

First to all thank's a lot, I've tested the nscp version 0.4.1.62 and it  has worked fine with a list of numbers. Congratulations for your Oracle Certification!!!!

I am working hard with CheckWmi and if is it possible, I'd like you to enhancement the result that it send to nagios. Let's give you an example:

I 'm monitoring the status of Disk Array with CheckWMIValue. I'd like controlling the output of this command, for example adding the column that I want to the result output.


If I run the next command, their output is:
CheckWMIValue  namespace=root\\adpt ""Query=Select DeviceID,StatusDescriptions,OperationalStatus, Name from CIM_DiskDrive""  check:Status=OperationalStatus MaxCri=10 

'''Output Result:'''
Running query: 'Select DeviceID,OperationalStatus,St
atusDescriptions,Name from CIM_DiskDrive' on: root\adpt with hostname: , username: ,password: , protocol:
Result checkwmivalue: OK
simple_client.hpp:80   OK:OK: Everything seems fine.
simple_client.hpp:82    Performance data: 'Status'=2;0;10 Status'=2;0;10

'''Example Of New Command:'''
""CheckWMIValue  namespace=root\\adpt ""Query=Select DeviceID,StatusDescriptions,OperationalStatus,Name from CIM_DiskDrive""  check:Status=OperationalStatus MaxCri=10 ""Header=%Name% %DeviceID% %StatusDescriptions%"" ""columnSeparator=|"" rowSeparator=-"" 

'''''New Output Result:'''''

CheckWMI\CheckWMI.cpp:248  Message is: 
 |Disco 1 | WD-WCANY3309005:1 |  DRIVE ONLINE |
 ----------------------------------------------------------
 |Disco 2 | WD-WCANY3346107:3 |  DRIVE ONLINE |
NSClient++.cpp:958  Result checkwmivalue: OK
simple_client.hpp:82     Performance data: 'Status'=2;0;10 Status'=2;0;10


For now, I have to use 2 checkwmivalue for that. The first command is to display the column that I want it. I'm controlling their output putting a MaxCrit value that it never take.  The second command is really to check the Array status condition.
 
Best Regards,
Ruben




",rubencrios@…
Core Component,617,reload static configuration does not load changes toi external scripts,Core,0.4.1,,defect,Bugs,MickeM,new,2013-04-11T16:09:16+02:00,2013-04-11T16:09:16+02:00,"Hi

When I make changes to scripts loaded by external files like:

[/includes]
customer = old://${exe-path}/customer.ini

I use the LUA script to reload the configuration to make the change active without restarting the service.

The output I get after running:

check_nrpe -H xxx -c reload_nrpe 

Is the following:

d /server/protocol.hpp:66   Accepting connection from: 192.168.251.xx
d rvice\NSClient++.cpp:960  Injecting: reload_nrpe...
l ipts/test_reload.lua:2    Changing configuration and reloading NRPE.
d mpl/settings_ini.hpp:253  Loading: C:/Program Files/NSClient++//nsclient_test.ini
d ngs_manager_impl.cpp:73   Creating instance for: old://${exe-path}/customer.ini
d mpl/settings_old.hpp:169  Loading OLD: old://${exe-path}/customer.ini for old://${exe-path}/customer.ini
d mpl/settings_old.hpp:41   Reading MAP file: C:/Program Files/NSClient++//old-settings.map
d mpl/settings_old.hpp:488  Reading old settings from: C:/Program Files/NSClient++//customer.ini
d ngs_manager_impl.cpp:73   Creating instance for: ini://${exe-path}/customer_new.ini
d mpl/settings_ini.hpp:299  Reading INI settings from: C:/Program Files/NSClient++//customer_new.ini
d mpl/settings_ini.hpp:253  Loading: C:/Program Files/NSClient++//customer_new.ini


It looks like the changes are read, but are not made active.

Is this possible? or can I only reload settings?

TIA

Fred ",neubauerf
Core Component,420,NagiosPlugins.vbs - parse_range doesn't do proper comparison,Core,0.3.9,0.4.2,defect,Bugs,mickem,new,2010-11-16T13:42:39+01:00,2012-11-17T08:13:00+01:00,"
{{{
C:\Program Files\NSClient++>cscript //nologo ""C:\Program Files\NSClient++\scripts\lib\wrapper.vbs"" ""C:\Program Files\NSClient
++\scripts\check_test.vbs"" /arg:10 /warning:2 /critical:5
OK: Testing  2 5
}}}

This shows, that NagiosPlugins.vbs, which is included by wrapper.vbs, says that everything is ""OK"". But the value/arg given (10) is larger then 2 and also larger then 5 and thus, it should return a CRITICAL error, just like it does, when arg is set to 9.

{{{
C:\Program Files\NSClient++>cscript //nologo ""C:\Program Files\NSClient++\scripts\lib\wrapper.vbs"" ""C:\Program Files\NSClient
++\scripts\check_test.vbs"" /arg:9 /warning:2 /critical:5
CRITICAL: Testing  2 5
}}}

This doesn't work, because the function parse_range in NagiosPlugins.vbs doesn't do a numerical comparison, but instead it does string comparisons.

Going to attach a fixed NagiosPlugins.vbs and also a patch file.",alex.s.77
Core Component,581,NSClient++ and Server 2008 R2 - Random crashes,Core,0.4.0,0.4.2,defect,Bugs,MickeM,new,2012-11-27T07:39:54+01:00,2012-11-27T08:18:22+01:00,"NSClient++ Version: 0.4.0.183

Randomly crashes on 2 of our 2008 R2 servers. 

This causes its TCP connections to get stuck in a CLOSE_WAIT state, which in turn causes the client to fail binding to its ports when it restarts.

Using TCPView, I can kill the CLOSE_WAIT Connections for port 5666 and 12489, but there are 2 other connections in a LISTENING state with a defunct Process ID. 

I have tried every trick I could think of and a few from google to kill this defunct connections (short of rebooting), to no avail. 

I know there was a similar issue with the previous version, but I assumed it had been resolved in 0.4.0.183?

If not - just letting you know the issue is still around. ",monkinsane
Core Component,485,"CheckDriveSize, perfdatas",Core,0.3.9,0.4.2,enhancement,Feature Requests,mickem,new,2011-11-10T15:05:26+01:00,2012-11-15T07:24:26+01:00,"Hello,

Something has changed in perfdata of CheckDriveSize in the last releases.

0.3.7 :
Performance Data 	'C:'=64%;5;2;

0.3.9
Performance Data 	'C: %'=45%;5;2 'C:'=11324.53MB;1018.85;407.54;0;20377

It would be nice if the module only give % perfdata if we give threshold in %. 
And only give perfdata in Bytes if we give threshold in bytes.

Same behavior with «CheckMem», and i'm sure more modules.

Regards.",benoitp
Core Component,143,add check_nt client,Core,0.3.1,future,enhancement,Bugs,MickeM,new,2008-03-18T16:24:54+01:00,2012-02-14T16:11:11+01:00,Add a check_nt (NSCLient) client to be able to act proxy for remote nodes.,mickem
Core Component,147,XML Settings file,Core,0.3.1,future,enhancement,Bugs,MickeM,new,2008-03-18T16:29:44+01:00,2012-02-14T16:10:38+01:00,"Add an settings module to handle XML settings files, also add support for ""long"" settings keys such as: modules/nrpe-module/timeout=xx.",mickem
Core Component,278,nsTray.exe crashes when an attempt is made to activate it. (Win2k8),Core,0.3.4,future,defect,Bugs,mickem,assigned,2009-02-07T16:31:23+01:00,2012-02-14T17:01:37+01:00,"Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	nstray.exe
  Application Version:	0.0.0.0
  Application Timestamp:	498c6ce8
  Fault Module Name:	kernel32.dll
  Fault Module Version:	6.0.6001.18000
  Fault Module Timestamp:	4791a76d
  Exception Code:	c0000005
  Exception Offset:	000482c0
  OS Version:	6.0.6001.2.1.0.272.7
  Locale ID:	1033
  Additional Information 1:	3a65
  Additional Information 2:	488b1fd8b2803adb7ab4f0e39653f969
  Additional Information 3:	9f37
  Additional Information 4:	b31d7b5e5b935c64a8fda28",anand_balaji@…
Core Component,345,Better support for $ARGx$ expansion to handle multiple arguments and such,Core,0.3.6,future,enhancement,Bugs,MickeM,new,2009-11-25T21:23:53+01:00,2012-02-14T12:48:35+01:00,,mickem
Core Component,488,UNKNOWN Status when Monitoring Windows Clock Sync.,Core,0.3.9,future,defect,Bugs,MickeM,new,2011-11-16T13:03:38+01:00,2012-03-13T15:21:02+01:00,"Hi,
Im running Nagios Core Version 3.2.3 on a Red Hat Enterprise Linux Server release 5.4 (Tikanga).

I created a script (VBScript) to monitor Window's date and time. As i understand, the Nagios Plugins exit status are the following:
0 = OK
1 = Warning
2 = Critical
3 = Unknown
My script never return 3 as exit status, it only return 0, 1 or 2 (depending on the result of it, cause it checks if its syncronized against another server).

The scripts works fine all the time, however, in random moments (approximately once every 3 or 4 hours) nagios report me things like this:

{{{
[06-10-2011 04:11:00] SERVICE ALERT: MyServer;Win Clock;OK;SOFT;2;NTP OK: Offset 0 secs.
[06-10-2011 04:10:00] SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;1;NTP OK: Offset 0 secs.
}}}

The code of my script:

{{{
Option Explicit
On Error Resume Next
Dim strCommand, objProc, objShell, input, strOutput, myRegExp, myMatches, myMatch, Status, result, Args, warn, crit, serverlist, criteria, i
Set Args = WScript.Arguments
criteria=""least""
i=0
Err = 0

' Funcion que captura los argumentos.
Function CaptureArguments()
   for i=0 to WScript.Arguments.Count-1
      Select Case Args.Item(i)
         Case ""-H"" , ""-h"", ""--help"", ""--HELP"", ""--Help"", ""/?"", ""/Help"", ""/HELP"", ""/help""
            ShowHelp
            Salir
         Case ""-R"", ""-r"", ""--readme"", ""--README"", ""--ReadMe"", ""/r"", ""/R"", ""/readme"", ""/README"", ""/ReadMe""
            ShowReadMe
            Salir
         Case ""-V"", ""-v"", ""--version"", ""--VERSION"", ""--Version"", ""/V"", ""/v"", ""/Version"", ""/VERSION"", ""/version""
            ShowVersion
            Salir
         Case ""-S"", ""-s"", ""--serverlist"", ""--SERVERLIST"", ""--ServerList"", ""/S"", ""/s"", ""/ServerList"", ""/SERVERLIST"", ""/ServerList""
            CheckNextParameter
            serverlist = Args.Item(i+1)
            i=i+1
         Case ""-W"", ""-w"", ""--warn"", ""--WARN"", ""--Warn"", ""--warning"", ""--WARNING"", ""--Warning"", ""/W"", ""/w"", ""/warn"", ""/WARN"", ""/Warn"", ""/warning"", ""/WARNING"", ""/Warning""
            CheckNextParameter
            warn = Args.Item(i+1)
            i=i+1
         Case ""-C"", ""-c"", ""--crit"", ""--CRIT"", ""--Crit"", ""--critical"", ""--CRITICAL"", ""--Critical"", ""/C"", ""/c"", ""/crit"", ""/CRIT"", ""/Crit"", ""/critical"", ""/CRITICAL"", ""/Critical""
            CheckNextParameter
            crit = Args.Item(i+1)
            i=i+1
         Case ""-B"", ""-b"", ""/B"", ""/b""
            criteria=""biggest""
         Case Else
            wscript.echo ""ERROR: Se ingreso un argumento Desconocido o Inesperado. Utilice el Help (/H) o ReadMe (/R).""
            Err = 1
            Salir
      End Select
   Next
End Function

' Funcion que verifica la correctitud del proximo parametro utilizado.
Function CheckNextParameter()
   ' Existe el Argumento para el Parametro?
   if (i+1 > WScript.Arguments.Count-1) then
      ' No, muestro error y salgo.
      WScript.echo ""ERROR: Falta argumento en parametro "" & Args.Item(i) & "".""
      Err = 1
      Salir
   end if
   ' El argumento del parametro contiene un ""-"" o un ""/"" (indica el inicio de un nuevo parametro)?
   if instr(Args.Item(i+1),""-"") OR instr(Args.Item(i+1),""/"") then
      ' Si, muestro error y salgo.
      WScript.echo ""ERROR: El argumento "" & Args.Item(i+1) & "" es invalido para el parametro "" & Args.Item(i) & "".""
      Err = 1
      Salir
   end if
End Function

' Funcion que verifica la correctitud de los Argumentos.
Function CheckArguments()
   ' Esta definido el parametro warn?
   If IsNull(warn) OR (warn = """") Then
      WScript.echo ""ERROR: El parametro warn (/W) no esta definido.""
      Err = 1
      Salir   
   End If
   ' Esta definido el parametro crit?
   If IsNull(crit) OR (crit = """") Then
      WScript.echo ""ERROR: El parametro crit (/C) no esta definido.""
      Err = 1
      Salir
   End If
   ' Esta definido el parametro serverlist?
   If IsNull(serverlist) OR (serverlist = """")  Then
      WScript.echo ""ERROR: El parametro serverlist (/S) no esta definido.""
      Err = 1
      Salir
   End If
   ' El argumento warn es numericos?
   If IsNumeric(warn) Then
      ' Si, El argumento warn es un numero entero (verifico si contiene un ""."") mayor que 0?
      If (not instr(warn,""."") = 0) OR (warn <= 0) Then
         ' No, muestro error y salgo.
         WScript.Echo ""ERROR: El argumento warn ("" & warn & "") no es un numero entero mayor a 0.""
         Err = 1
         Salir
      Else
         ' Si, lo convierto a Double.
         warn=CDbl(warn)
      End If
   Else
      ' No, muestro error y salgo.
      WScript.Echo ""ERROR: El argumento warn ("" & warn & "") no es numerico.""
      Err = 1
      Salir
   End if
   ' El argumento crit es numericos?
   If IsNumeric(crit) Then
      ' Si, El argumento crit es un numero entero (verifico si contiene un ""."") mayor que 0?
      If (not instr(crit,""."") = 0) OR (crit <= 0) Then
         ' No, muestro error y salgo.
         WScript.Echo ""ERROR: El argumento crit ("" & crit & "") no es un numero entero mayor a 0.""
         Err = 1
         Salir
      Else
         ' Si, lo convierto a Double.
         crit=CDbl(crit)    
      End If
   Else
      ' No, muestro error y salgo.
      WScript.Echo ""ERROR: El argumento crit ("" & crit & "") no es numerico.""
      Err = 1
      Salir
   End if
   ' El argumento crit es mayor que el argumento warn?
   If crit < warn then
      ' No, muestro error y salgo.
      WScript.Echo ""ERROR: El argumento crit ("" & crit & "") es menor que el argumento warn ("" & warn & "")""
      Err = 1
      Salir
   End if
End Function

' Funcion que muestra el HELP.
Function ShowHelp()
   Wscript.Echo """"
   Wscript.Echo ""Parametros      Descripcion""
   Wscript.Echo ""/S serverlist       Uno o varios servidores separados por coma.""
   Wscript.Echo ""/W warn       Warning offset en segundos.""
   Wscript.Echo ""/C crit       Critical offset en segundos.""
   Wscript.Echo ""/B         Si varios servidores NTPd son especificados, se utilizara el de mayor offset."" 
   Wscript.Echo """"
End Function

' Funcion que muestra la ultima version.
Function ShowVersion()
   WScript.Echo ""*****""
   WScript.Echo "" Modificado por: Fabian Olender""
   WScript.Echo "" Version: 1.2""
   WScript.Echo "" Fecha: 13/01/2011""
   WScript.Echo "" Descripcion: Traduccion al Español y arreglo de BUGs en casos que no funcionaba.""
   WScript.Echo ""*****""
End Function

' Funcion que muestra el ReadMe.
Function ShowReadMe()
   WScript.Echo """"
   WScript.Echo "" ----- ""
   WScript.Echo ""| Uso |""
   WScript.Echo "" ----- ""
   WScript.Echo ""Uso: ""
   WScript.Echo ""   cscript /NoLogo check_time.vbs serverlist warn crit [biggest]""
   WScript.Echo ""Ejemplos de Uso: ""
   Wscript.Echo ""   cscript /NoLogo check_time.vbs Server1,Server2 0.4 5 biggest""
   Wscript.Echo ""   cscript /NoLogo check_time.vbs www.xxx.yyy.zzz 10 120""
   Wscript.Echo ""   cscript /T:30 /NoLogo check_time.vbs TuDominio.net 120 300""
   WScript.Echo """"
   WScript.Echo "" ------------ ""
   WScript.Echo ""| Parametros |""
   WScript.Echo "" ------------ ""
   Wscript.Echo """"
   Wscript.Echo ""-H , -h, --help, --HELP, --Help, /?, /Help, /HELP, /help""
   Wscript.Echo ""   Default: Sin Asignar""
   Wscript.Echo ""   Descripcion: Muestra el Help del Script para conocer su funcionamiento.""
   Wscript.Echo """"
   Wscript.Echo ""-R, -r, --readme, --README, --ReadMe, /r, /R, /readme, /README, /ReadMe""
   Wscript.Echo ""   Default: Sin Asignar""
   Wscript.Echo ""   Descripcion: Muestra el ReadMe que se esta viendo ahora.""
   Wscript.Echo """"
   Wscript.Echo ""-V, -v, --version, --VERSION, --Version, /V, /v, /Version, /VERSION, /version""
   Wscript.Echo ""   Default: Sin Asignar""
   Wscript.Echo ""   Descripcion: Muestra la version actual del Script.""
   Wscript.Echo ""-S, -s, --serverlist, --SERVERLIST, --ServerList, /S, /s, /ServerList, /SERVERLIST, /ServerList""
   Wscript.Echo """"
   Wscript.Echo ""   Default: Sin Asignar. Requerido para la ejecucion del Script.""
   Wscript.Echo ""   Descripcion: Listado de servidores con NTPd.""
   Wscript.Echo """"
   Wscript.Echo ""-W, -w, --warn, --WARN, --Warn, --warning, --WARNING, --Warning, /W, /w, /warn, /WARN, /Warn, /warning, /WARNING, /Warning""
   Wscript.Echo ""   Default: Sin Asignar. Requerido para la ejecucion del Script.""
   Wscript.Echo ""   Descripcion: Tiempo en Segundos a partir de generar Warning de Dessincronizacion.""
   Wscript.Echo ""   Requerimientos: Valor Entero mayor que 0.""
   Wscript.Echo """"
   Wscript.Echo ""-C, -c, --crit, --CRIT, --Crit, --critical, --CRITICAL, --Critical, /C, /c, /crit, /CRIT, /Crit, /critical, /CRITICAL, /Critical""
   Wscript.Echo ""   Default: Sin Asignar. Requerido para la ejecucion del Script.""
   Wscript.Echo ""   Descripcion: Tiempo en Segundos a partir de generar Warning de Dessincronizacion.""
   Wscript.Echo ""   Requerimientos: Valor Entero mayor que 0.""
   Wscript.Echo """"
   Wscript.Echo ""-B, -b, /B, /b""
   Wscript.Echo ""   Default: Desactivado. Se utiliza por defecto el de Mayor Offset. Parametro Opcional""
   Wscript.Echo ""   Descripcion: Si varios servidores NTPd son especificados, se utilizara el de mayor offset.""
   Wscript.Echo """"
   WScript.Echo "" ----------- ""
   WScript.Echo ""| Versiones |""
   WScript.Echo "" ----------- ""
   WScript.Echo "" Modificado por: Freddy""
   WScript.Echo "" Version: 1.1""
   WScript.Echo "" Fecha: 02/12/2010""
   WScript.Echo "" Descripcion: Modificacion para mejorar performance de pnp4nagios addon y sugerencias para arreglar ciertos casos de mal funcionamiento.""
   WScript.Echo """"
   WScript.Echo "" Modificado por: Dmitry Vayntrub (dvayntrub@yahoo.com)""
   WScript.Echo "" Version: 1.01""
   WScript.Echo "" Fecha: 17/01/2010""
   WScript.Echo "" Descripcion: Modificacion general y renombre del script.""
   WScript.Echo """"
   WScript.Echo "" Creado por: Mattias Ryrlén (check_ad_time.vbs)""
   WScript.Echo "" Version: 1.0""
   WScript.Echo "" Fecha: -""
   WScript.Echo "" Descripcion: Verifica el time offset de un cliente Windows contra uno o multiples servidor NTPd.""
   WScript.Echo """"
End Function

' Funcion que ejecuta el comando W32TM y parsea el Output.
Function W32TM()
   ' Ejecuto el comando w32time.exe
   Set objShell = CreateObject(""Wscript.Shell"")
   strCommand = ""%SystemRoot%\System32\w32tm.exe /monitor /computers:"" & serverlist
   set objProc = objShell.Exec(strCommand)
   ' Parseo el Output para obtener unicamente el NTP offset.
   input = """"
   strOutput = """"
   Do While Not objProc.StdOut.AtEndOfStream
      input = objProc.StdOut.ReadLine
      If InStr(input, ""NTP"") Then
         strOutput = strOutput & input
      End If
   Loop
   Set myRegExp = New RegExp
   myRegExp.IgnoreCase = True
   myRegExp.Global = True
   myRegExp.Pattern = "" NTP: ([+-][0-9]+\.[0-9]+)s""
   Set myMatches = myRegExp.Execute(strOutput)
   result = """"
   If myMatches(0).SubMatches(0) <> """" Then
      result = myMatches(0).SubMatches(0)
   End If
   For Each myMatch in myMatches
      If myMatch.SubMatches(0) <> """" Then
         If criteria = ""biggest"" Then
            If abs(result) < Abs(myMatch.SubMatches(0)) Then
               result = myMatch.SubMatches(0)
            End If
         Else
            If abs(result) > Abs(myMatch.SubMatches(0)) Then
               result = myMatch.SubMatches(0)
            End If
         End If
      End If
   '   Wscript.Echo myMatch.SubMatches(0) & "" -debug""
   Next
End Function

' Funcion que muestra el resultado del Script con el formato adecuado.
Function ShowResult()
   ' Quito lo que esta despues del ""."", quito el signo (""+"" o ""-"") y obtengo el numero.
   result=Left(result,instr(result,""."")-1)
   result=Right(result,Len(result)-1)
   result=CDbl(result)
   If (result > 0 AND result > crit ) OR (result < 0 AND result < crit) Then
      Err = 2
      status = ""CRITICAL""
   Else
      If (warn > 0 AND result > warn ) OR (warn < 0 AND result < warn) Then
         Err = 1
         status = ""WARNING""
      else
         Err = 0
         status = ""OK""      
      End If
   End If
   WScript.Echo ""NTP "" & status & "": Offset "" & result & "" secs.""
   Salir
End Function

Function Salir()
   WScript.Quit(Err)
End Function

' ########
' # Main #
' ########
CaptureArguments
CheckArguments
W32TM
ShowResult
Salir
}}}

How to use it with command line (DOS):
{{{
cscript.exe //T:30 //NoLogo check_time.vbs /S www.xxx.yyy.zzz /W 120 /C 300
}}}
* www.xxx.yyy.zzz = NTP Server

""NSC.ini"":
{{{
...
[External Scripts]
check_windows_time=cscript.exe //T:30 //NoLogo check_time.vbs /S 10.45.225.11 /W 120 /C 300
...
;[LUA Scripts]
command[check_windows_time]=cscript.exe //T:30 //NoLogo check_time.vbs /S 10.45.225.11 /W 120 /C 300
...
}}}

Service definition in Nagios Server:
{{{
define service{
           use                  generic-service
           host_name            MyServer
           service_description  Win Clock
           check_command        check_nrpe!check_windows_time
}
}}}

I've set ""nagios.cfg"" to the max debug level (""debug_level=-1"" and ""debug_verbosity=2"") and what i've saw in ""nagios.debug"" for the ""Win Clock"" service i've defined in Host ""MyServer "" when and ""Unknown"" result appeats is:
{{{
[1307617373.175579] [016.2] [pid=377] Found a check result (#4) to handle...
[1307617373.175615] [016.1] [pid=377] Handling check result for service 'Win Clock' on host 'MyServer'...
[1307617373.175636] [001.0] [pid=377] handle_async_service_check_result()
[1307617373.175657] [016.0] [pid=377] ** Handling check result for service 'Win Clock' on host 'MyServer'...
[1307617373.175676] [016.1] [pid=377] HOST: MyServer, SERVICE: Win Clock, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 3, OUTPUT: NTP OK: Offset 1 secs.\n
[1307617373.175755] [016.2] [pid=377] Parsing check output...
[1307617373.175776] [016.2] [pid=377] Short Output: NTP OK: Offset 1 secs.
[1307617373.175822] [016.2] [pid=377] Long Output:  NULL
[1307617373.175840] [016.2] [pid=377] Perf Data:    NULL
[1307617373.175858] [016.2] [pid=377] ST: HARD  CA: 1  MA: 3  CS: 3  LS: 0  LHS: 0
[1307617373.175886] [016.2] [pid=377] Service has changed state since last check!
[1307617373.175918] [016.1] [pid=377] Service is in a non-OK state!
[1307617373.175939] [016.1] [pid=377] Host is currently UP, so we'll recheck its state to make sure...
[1307617373.175959] [001.0] [pid=377] run_async_host_check_3x()
[1307617373.175976] [016.0] [pid=377] ** Running async check of host 'MyServer'...
[1307617373.175996] [001.0] [pid=377] check_host_check_viability_3x()
[1307617373.176017] [001.0] [pid=377] check_time_against_period()
[1307617373.176043] [001.0] [pid=377] check_host_dependencies()
[1307617373.176065] [064.1] [pid=377] Making callbacks (type 14)...
[1307617373.176101] [064.2] [pid=377] Callback #1 (type 14) return code = 0
[1307617373.176122] [016.0] [pid=377] Checking host 'MyServer'...
[1307617373.176141] [001.0] [pid=377] adjust_host_check_attempt_3x()
[1307617373.176161] [016.2] [pid=377] Adjusting check attempt number for host 'MyServer': current attempt=1/10, state=0, state type=1
[1307617373.176230] [016.2] [pid=377] New check attempt number = 1
[1307617373.176347] [001.0] [pid=377] get_raw_command_line()
[1307617373.176396] [2320.2] [pid=377] Raw Command Input: $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
[1307617373.176417] [2320.2] [pid=377] Expanded Command Output: $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
[1307617373.176438] [001.0] [pid=377] process_macros()
[1307617373.176457] [2048.1] [pid=377] **** BEGIN MACRO PROCESSING ***********
[1307617373.176477] [2048.1] [pid=377] Processing: '$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5'
[1307617373.176498] [2048.2] [pid=377]   Processing part: ''
[1307617373.176515] [2048.2] [pid=377]   Not currently in macro.  Running output (0): ''
[1307617373.176536] [2048.2] [pid=377]   Processing part: 'USER1'
[1307617373.176560] [2048.2] [pid=377]   Processed 'USER1', Clean Options: 0, Free: 0
[1307617373.176588] [2048.2] [pid=377]   Processed 'USER1', Clean Options: 0, Free: 0
[1307617373.176614] [2048.2] [pid=377]   Cleaning options: global=0, local=0, effective=0
[1307617373.176636] [2048.2] [pid=377]   Uncleaned macro.  Running output (25): '/usr/local/nagios/libexec'
[1307617373.176655] [2048.2] [pid=377]   Just finished macro.  Running output (25): '/usr/local/nagios/libexec'
[1307617373.176675] [2048.2] [pid=377]   Processing part: '/check_ping -H '
[1307617373.176749] [2048.2] [pid=377]   Not currently in macro.  Running output (40): '/usr/local/nagios/libexec/check_ping -H '
[1307617373.176788] [2048.2] [pid=377]   Processing part: 'HOSTADDRESS'
[1307617373.176827] [2048.2] [pid=377]   macro_x[2] (HOSTADDRESS) match.
[1307617373.176854] [2048.2] [pid=377]   Processed 'HOSTADDRESS', Clean Options: 0, Free: 1
[1307617373.176874] [2048.2] [pid=377]   Processed 'HOSTADDRESS', Clean Options: 0, Free: 1
[1307617373.176894] [2048.2] [pid=377]   Cleaning options: global=0, local=0, effective=0
[1307617373.176915] [2048.2] [pid=377]   Uncleaned macro.  Running output (52): '/usr/local/nagios/libexec/check_ping -H My.Server.IP.Address'
[1307617373.176936] [2048.2] [pid=377]   Just finished macro.  Running output (52): '/usr/local/nagios/libexec/check_ping -H My.Server.IP.Address'
[1307617373.176971] [2048.2] [pid=377]   Processing part: ' -w 3000.0,80% -c 5000.0,100% -p 5'
[1307617373.176996] [2048.2] [pid=377]   Not currently in macro.  Running output (86): '/usr/local/nagios/libexec/check_ping -H My.Server.IP.Address -w 3000.0,80% -c 5000.0,100% -p 5'
[1307617373.177016] [2048.1] [pid=377]   Done.  Final output: '/usr/local/nagios/libexec/check_ping -H My.Server.IP.Address -w 3000.0,80% -c 5000.0,100% -p 5'
[1307617373.177036] [2048.1] [pid=377] **** END MACRO PROCESSING *************
[1307617373.177126] [016.1] [pid=377] Check result output will be written to '/usr/local/nagios/var/spool/checkresults/checkX3Szdk' (fd=8)
[1307617373.177237] [064.1] [pid=377] Making callbacks (type 14)...
[1307617373.177277] [064.2] [pid=377] Callback #1 (type 14) return code = 0
[1307617373.178927] [016.2] [pid=377] Host check is executing in child process (pid=9253)
[1307617373.182785] [001.0] [pid=9253] process_macros()
[1307617373.183092] [001.0] [pid=9253] process_macros()
[1307617373.183119] [001.0] [pid=9253] process_macros()
[1307617373.183792] [001.0] [pid=9253] process_macros()
[1307617373.183859] [001.0] [pid=9253] process_macros()
[1307617373.183888] [001.0] [pid=9253] process_macros()
[1307617373.196901] [016.1] [pid=377] Current/Max Attempt(s): 1/3
[1307617373.196944] [016.1] [pid=377] Host is UP, so we'll retry the service check...
[1307617373.197046] [001.0] [pid=377] process_macros()
[1307617373.197084] [2048.1] [pid=377] **** BEGIN MACRO PROCESSING ***********
[1307617373.197130] [2048.1] [pid=377] Processing: 'SERVICE ALERT: MyServer;Win Clock;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;NTP OK: Offset 1 secs.
[1307617373.197170] [2048.2] [pid=377]   Processing part: 'SERVICE ALERT: MyServer;Win Clock;'
[1307617373.197228] [2048.2] [pid=377]   Not currently in macro.  Running output (31): 'SERVICE ALERT: MyServer;Win Clock;'
[1307617373.197251] [2048.2] [pid=377]   Processing part: 'SERVICESTATE'
[1307617373.197359] [2048.2] [pid=377]   macro_x[4] (SERVICESTATE) match.
[1307617373.197383] [2048.2] [pid=377]   Processed 'SERVICESTATE', Clean Options: 0, Free: 1
[1307617373.197417] [2048.2] [pid=377]   Processed 'SERVICESTATE', Clean Options: 0, Free: 1
[1307617373.197445] [2048.2] [pid=377]   Cleaning options: global=0, local=0, effective=0
[1307617373.197503] [2048.2] [pid=377]   Uncleaned macro.  Running output (38): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN'
[1307617373.197526] [2048.2] [pid=377]   Just finished macro.  Running output (38): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN'
[1307617373.197547] [2048.2] [pid=377]   Processing part: ';'
[1307617373.197566] [2048.2] [pid=377]   Not currently in macro.  Running output (39): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;'
[1307617373.197586] [2048.2] [pid=377]   Processing part: 'SERVICESTATETYPE'
[1307617373.197608] [2048.2] [pid=377]   macro_x[42] (SERVICESTATETYPE) match.
[1307617373.197629] [2048.2] [pid=377]   Processed 'SERVICESTATETYPE', Clean Options: 0, Free: 1
[1307617373.197649] [2048.2] [pid=377]   Processed 'SERVICESTATETYPE', Clean Options: 0, Free: 1
[1307617373.197670] [2048.2] [pid=377]   Cleaning options: global=0, local=0, effective=0
[1307617373.197726] [2048.2] [pid=377]   Just finished macro.  Running output (43): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT'
[1307617373.197747] [2048.2] [pid=377]   Processing part: ';'
[1307617373.197766] [2048.2] [pid=377]   Not currently in macro.  Running output (44): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;'
[1307617373.197787] [2048.2] [pid=377]   Processing part: 'SERVICEATTEMPT'
[1307617373.197808] [2048.2] [pid=377]   macro_x[6] (SERVICEATTEMPT) match.
[1307617373.197831] [2048.2] [pid=377]   Processed 'SERVICEATTEMPT', Clean Options: 0, Free: 1
[1307617373.197851] [2048.2] [pid=377]   Processed 'SERVICEATTEMPT', Clean Options: 0, Free: 1
[1307617373.197871] [2048.2] [pid=377]   Cleaning options: global=0, local=0, effective=0
[1307617373.197893] [2048.2] [pid=377]   Uncleaned macro.  Running output (45): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;1'
[1307617373.197911] [2048.2] [pid=377]   Just finished macro.  Running output (45): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;1'
[1307617373.197931] [2048.2] [pid=377]   Processing part: ';NTP OK: Offset 1 secs.'
[1307617373.197953] [2048.2] [pid=377]   Not currently in macro.  Running output (69): 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;1;NTP OK: Offset 1 secs.'
[1307617373.197973] [2048.1] [pid=377]   Done.  Final output: 'SERVICE ALERT: MyServer;Win Clock;UNKNOWN;SOFT;1;NTP OK: Offset 1 secs.'
[1307617373.197994] [2048.1] [pid=377] **** END MACRO PROCESSING *************
[1307617373.198388] [064.1] [pid=377] Making callbacks (type 9)...
[1307617373.198523] [064.2] [pid=377] Callback #1 (type 9) return code = 0
[1307617373.198555] [001.0] [pid=377] handle_service_event()
[1307617373.198575] [064.1] [pid=377] Making callbacks (type 30)...
[1307617373.198619] [064.2] [pid=377] Callback #1 (type 30) return code = 0
[1307617373.198647] [001.0] [pid=377] run_global_service_event_handler()
[1307617373.198669] [001.0] [pid=377] check_for_external_commands()
[1307617373.198695] [016.1] [pid=377] Rescheduling next check of service at Thu Jun  9 08:03:45 2011
[1307617373.198715] [001.0] [pid=377] get_next_valid_time()
[1307617373.198734] [001.0] [pid=377] check_time_against_period()
[1307617373.198762] [001.0] [pid=377] schedule_service_check()
[1307617373.198783] [016.0] [pid=377] Scheduling a non-forced, active check of service 'Win Clock' on host 'MyServer' @ Thu Jun  9 08:03:45 2011
[1307617373.198837] [016.2] [pid=377] Scheduling new service check event.
[1307617373.198859] [001.0] [pid=377] reschedule_event()
[1307617373.198877] [001.0] [pid=377] add_event()
[1307617373.198900] [064.1] [pid=377] Making callbacks (type 8)...
[1307617373.198935] [064.2] [pid=377] Callback #1 (type 8) return code = 0
[1307617373.198990] [064.1] [pid=377] Making callbacks (type 20)...
[1307617373.199051] [064.2] [pid=377] Callback #1 (type 20) return code = 0
[1307617373.199075] [064.1] [pid=377] Making callbacks (type 13)...
[1307617373.199114] [064.2] [pid=377] Callback #1 (type 13) return code = 0
[1307617373.199171] [064.1] [pid=377] Making callbacks (type 20)...
[1307617373.199230] [064.2] [pid=377] Callback #1 (type 20) return code = 0
[1307617373.199275] [001.0] [pid=377] check_for_service_flapping()
[1307617373.199309] [016.1] [pid=377] Checking service 'Win Clock' on host 'MyServer' for flapping...
[1307617373.199331] [001.0] [pid=377] check_for_host_flapping()
[1307617373.199361] [016.1] [pid=377] Checking host 'MyServer' for flapping...
[1307617373.199414] [016.2] [pid=377] LFT=5.00, HFT=20.00, CPC=0.00, PSC=0.00%
[1307617373.199440] [016.1] [pid=377] Host is not flapping (0.00% state change).
[1307617373.199487] [016.1] [pid=377] Deleted check result file '/usr/local/nagios/var/spool/checkresults/creM40o'
}}}

I'm sure that theres only one instance of Nagios running (checked with ""# ps faux"", restarting nagios and even rebooting the system).

I've already try increasing the cscript timeout (""cscript.exe //T XXX ..."" in ""NSC.ini"") and the NRPE timout (""...check_nrpe -t XXX..."" in ""commands.cfg"") but the problem remains.

Updated NSClient++ to its last version (0.3.9) and even try the last nightly build (0.4.0.111) but the problem remains.

""NSClient++"" LOGs show me this when the UNKNOWN response ocurrs:
{{{
YYY-MM-DD hh:mm:ss: error:modules\CheckExternalScripts\CheckExternalScripts.cpp:214: The command (cscript.exe) returned an invalid return code: 128
}}}

Does anyone known what this could be happeining? I cant understand why Nagios Core report an ""Unknown"" state for my ""Win Clock"" service in host ""MyServer"" when my script never return me an exit status of ""3"".

Please tell me if more information (like the ""commands.cfg"" or something else) is needed to help me solve this issue.


Thanks in advance!

PD: Sorry for my poor English.",BiFo
Core Component,132,automatically reread NSC.ini,Core,0.3.0,future,defect,Feature Requests,mickem,assigned,2008-02-21T00:07:28+01:00,2012-02-16T20:10:04+01:00,"NSClient++ should automatically detect a change in NSC.ini (also the includes from includes-Section) and reread the settings from them.[[BR]]
Thanks",anonymous
Core Component,157,LDAP authentification,Core,0.3.9,future,enhancement,Feature Requests,mickem,assigned,2008-04-04T11:43:50+02:00,2012-02-14T17:00:25+01:00,"
Hi,

It would be great if NSClient++ could use also a LDAP for authentification. (Active Diretory, OpenLDAP,... for example)
Network flow:
{{{
check_nrpe (or nt) client <-----------> NSClient++ agent <------------> LDAP
                          NRPE protocol                  LDAP protocol
                        NSCLient protocol   
}}}
Best regards,",Nyal
Core Component,247,environment variables in nsc.ini,Core,0.3.5,future,enhancement,Feature Requests,mickem,assigned,2008-10-19T09:35:47+02:00,2012-02-14T17:01:12+01:00,it's possible to use environment variables (especially %ProgramFiles% and %Compuername%) inside NSC.ini?,anonymous
Core Component,265,check_ntp,Core,0.3.4,future,enhancement,Feature Requests,MickeM,new,2008-12-11T14:51:40+01:00,2012-02-15T14:37:52+01:00,"Want a module to check that time is in sync with a remote ntp server, raise an alert if not.
",admin@…
Core Component,429,slow memory leak,Core,0.4.0,0.4.2,defect,Bugs,mickem,new,2011-01-11T18:27:55+01:00,2012-11-17T15:02:58+01:00,"We are testing the latest iteration of nsclient 3.9 and noticed a slow ~5 MB per week leak when using our standard service checks.  The specific version we are testing is 0.3.9.221 (2010-12-26) but noticed the same slow leak with our 3.7 instances too.  I've attached a graph of the perfmon object 'Private Bytes' used by nsclient.  The graph spans 1 week, the lighter blue line is the nsclient.exe (we have more than 1 leaking process).  I've run these charts for as much as 4 weeks at a time and can see continual memory growth from nsclient regardless of the length of time we monitor.  The leak is slow and the agent is stable otherwise, this is probably not a big problem, but a matter of making a quality product.  Thanks for your efforts and diligence in making this tool useful for the community.

Regards,

Roger G.

We run the following service checks via NSClient:
{{{
CPU status (check_nrpe -> vbscript)
event log errors (check_nrpe -> CheckEventLog)
file io (check_nrpe -> CheckCounter)
memory (check_nrpe -> CheckWMIValue) there are 9 of these run via check_multi
services (check_nrpe -> CheckServiceState)
nsclient (check_nt -> CLIENTVERSION)
drive space (check_nrpe -> CheckDriveSize)
}}}

nsc.ini:
{{{
[modules]
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
CheckWMI.dll
CheckExternalScripts.dll

[crash]
restart=1

[Settings]
password=xxxxxxxxxxxx
allowed_hosts=xxx.xxx.xxx.xxx
use_file=1

[log]
file=nsclient.log

[NSClient]
port=xxxx
socket_timeout=600

[NRPE]
port=xxxxx
command_timeout=360
allow_arguments=1
allow_nasty_meta_chars=1

[EventLog]
buffer_size=524287

[Check System]
CPUBufferSize=90m
CheckResolution=10
check_all_services[SERVICE_AUTO_START]=started
check_all_services[SERVICE_DISABLED]=stopped

[Script Wrappings]
vbs=cscript.exe //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
wsf=cscript.exe //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
bat=scripts\%SCRIPT% %ARGS%

[External Alias]
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_service=checkServiceState CheckAll
alias_process=checkProcState $ARG1$=started
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
alias_up=checkUpTime MinWarn=1d MinWarn=1h
alias_file_age=checkFile2 filter=out ""file=$ARG1$"" filter-written=>1d MaxWarn=1 MaxCrit=1 ""syntax=%filename% %write%""
alias_file_size=checkFile2 filter=out ""file=$ARG1$"" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 ""syntax=%filename% %size%""
alias_file_size_in_dir=checkFile2 filter=out pattern=*.txt ""file=$ARG1$"" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 ""syntax=%filename% %size%""
alias_event_log_old=CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions  ""syntax=%severity%: %source%: %message% (%count%)""
alias_event_log_new=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 ""filter=generated gt -2d AND severity NOT IN ('success', 'informational')"" truncate=800 unique descriptions ""syntax=%severity%: %source%: %message% (%count%)""
alias_event_log=alias_event_log_new
check_ok=CheckOK Everything is fine!

[Wrapped Scripts]
file_text_search=file_text_search.wsf"" ""$ARG1$"" ""$ARG2$"" ""$ARG3$""
wmi_cpu_perf=wmi_cpu_perf.vbs
wmi_process_perf=wmi_cpu_perf.vbs /process:$ARG1$
wmi_disk_perf_query=wmi_disk_perf.vbs /cmd:query /var:$ARG1$
wmi_disk_perf_index=wmi_disk_perf.vbs /cmd:index
wmi_disk_perf_get=wmi_disk_perf.vbs /cmd:get /var:$ARG1$ /drive:$ARG2$
wmi_mem_top_use=wmi_mem_top_use.vbs
2k3_db_ora_query=DB_Check_2k3.vbs /t:Oracle /s:""$ARG1$"" /db:$ARG2$ /ds:$ARG2$ /u:$ARG3$ /p:$ARG4$ $ARG5$ $ARG6$
2k3_url_check=urlCheck.vbs ""$ARG1$"" $ARG2$ $ARG3$
dhcp_client=dhcp_client.vbs
check_usb_device=check_usb_device.vbs /s:""$ARG1$""
check_win_file_io=check_win_file_io.vbs $ARG1$ $ARG2$ $ARG3$

[includes]
localhost.ini

[NRPE Client Handlers]
check_other=-H 192.168.0.1 -p 5666 -c remote_command -a arguments
}}}",rogerglass
Core Component,542,"Firewall Rule opens all TCP and UDP ports, it should only open the ports in use",Core,0.3.9,future,defect,Bugs,mickem,assigned,2012-06-30T02:10:07+02:00,2012-11-17T11:00:54+01:00,"It appears that by default the firewall rules that were inserted automatically by NSClient++ are very open. It opens ALL TCP and UDP ports. This is a security risk and as such, that feature should be disabled until it is fixed to at least only allow in the 3-ish default TCP ports, if not read the config file and allow in the specific ports that the NSC.ini needs.",TommyTheKid
LUA Component,140,Improvements in the LUA module,LUA,0.3.1,future,enhancement,Bugs,mickem,new,2008-03-18T16:22:54+01:00,2012-02-16T20:00:24+01:00,Add context/support for PDH/WMI/Services/Processes to make it simple to manage them,mickem
NRPE Component,599,Issue for nrpe command on nsclient,NRPE,0.4.1,,defect,Bugs,mickem,new,2013-01-24T15:49:47+01:00,2013-01-24T15:49:47+01:00,"I installed my NSCP-0.4.1.73-x64 client in one of my Windows 2008 64bit AD server. Using this i could monitor the cpu,memory,disk & uptime.

Now i have put .vbs script under settings/script directory of nsclient++ and trying to monitor active directory roles.

I'm receiving the following error on nagios server when i check through nagios server.
[username@xxxxx libexec]$ ./check_nrpe -u -H 10.36.31.118 -c check_ad No handler for command: scriptscheck_ad

I've checked my nsclient.ini file but I cannot found errors. The entries in my nsclient.ini file are:

[External Scripts] 
check_ad=check_ad.exe --dc --noeventlog

this script is running fine on remote monitoring server. Can you help to solve this issue.",thamildct
NRPE Component,607,Connection refused Version 0.4.1.73,NRPE,0.4.1,,defect,Bugs,mickem,new,2013-03-05T08:57:26+01:00,2013-03-06T10:40:26+01:00,"Hi, 

we had installed the nsclient++ version 0.3.9 on Windows Server 2003 R2. With Nagios we get a response with the check of the version from nsclient. Now we have updated to the version 0.4.1.73 and now Nagios get Connection refused by host by checking check_nrpe -H FQDN, also by other services. On the ini file the IP from Nagios is set on allowed hosts and all setings are activated. If i open netstat i cannot see the connection with port 12489, on the old version we had seen the connection. The windows firewall is disable. The problem happens only on Windows Server 2003 R2, on Windows 2008 R2 the config works and Nagios give response. With the newest version of NSclient it doesnt work also. 

Thanks for help. 

Kind regards Christina",Christina.Schultz
NRPE Component,612,nrpe proxy stops working after some hours,NRPE,0.4.1,,defect,Bugs,mickem,new,2013-04-01T12:07:47+02:00,2013-04-03T12:34:14+02:00,"Hi all,
I use nsclient 0.4.1.90 in a proxy configuration, meaning that the central nagios server uses e.g.
/usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -n -c nrpe_query -a host=dc.mww-bln.local command=alias_diskc
to contact the the nsclient instance on x.x.x.x that then makes a nrpe_query to dc.mww-bln.local and running the diskc check

this works fine for 4-5 hours at which point it stops and the check_nrpe from the central server will result in 
""CHECK_NRPE: Error receiving data from daemon"".
this problems exists with several sites that I monitor so it cannot be a problem with the monitored systems, it has to be nsclient, my central nagios server or my configuration.

nsclient.ini on the proxy system x.x.x.x is as follows:
{{{
[/modules]
CheckDisk = 1
CheckEventLog = 1
CheckExternalScripts = 1
CheckHelpers = 1
CheckNSCP = 1
CheckSystem = 1
NRPEClient = 1
NRPEServer = 1
NSClientServer = 1

[/settings/log]
date format = %Y-%m-%d %H:%M:%S
file name = ${exe-path}/nsclient.log
; LOG LEVEL - Log level to use. Avalible levels are error,warning,info,debug,trace
level = debug

[/settings/NSClient/server]
port = 1250

[/settings/default]
allow arguments = true
cache_allowed_hosts = 0
allowed hosts = y.y.y.y, 172.25.0.0/16, 127.0.0.1/32

[/settings/NRPE/server]
allow arguments = true
port = 5666

[/targets]
dc = 172.25.9.1
eub-file = 172.25.8.30
eub-mail02 = 172.25.8.60

[/settings/NRPE/client/targets/dc]
ssl = false
address = 172.25.9.1

[/settings/NRPE/client/targets/eub-file]
ssl = false
address = 172.25.8.30

[/settings/NRPE/client/targets/eub-mail02]
ssl = false
address = 172.25.8.60

[/settings/external scripts/alias]
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_diskC = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=C
alias_diskD = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=D
alias_diskE = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=E
alias_diskF = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=E
alias_diskG = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=F
alias_diskH = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=G
alias_diskI = CheckDriveSize MinWarn=10% MinCrit=5% FilterType=FIXED Drive=H
default = 

[/settings/external scripts]
allow arguments = true

[/settings/external scripts/scripts]
check_host_alive = plugins\check_winping -H $ARG1$ --warning 100,80% --critical 250,100%
}}}

any clues what might be wrong?

thanks,

Uli",uliwurst
NRPE Component,520,Check multiple performance Counters / Wildcard Support,NRPE,0.3.8,future,enhancement,Feature Requests,mickem,assigned,2012-04-20T11:42:59+02:00,2012-04-20T12:41:01+02:00,"Hello!
Is there a way to integrate wildcard-Support for ""check_nrpe -c Check Counter"" to catch multiple performancecounter objects or values at once?

for example like: 
'typeperf  ""Process(NSCLIENT++*)\% Processor Time""'

and

'typeperf  ""Process(NSCLIENT++)\*""'

thanks",jsassm
NRPE Component,578,"CheckFile2, Filters does not behave as per documentation.",NRPE,0.3.9,0.4.2,defect,Bugs,mickem,new,2012-11-22T11:12:33+01:00,2012-11-22T11:29:01+01:00,"Hello.
ive encounted a bug for the checkfile2 part for the NRPE plugin for NSCLIENT.

I work at op5 support and this has been verified on our customers environment aswell as our own test environments.

Please see https://bugs.op5.com/view.php?id=6108

Below is a paste of our bugreport for you conveiniance.

CheckFile2, Filters does not behave as per documentation.
 
Reproduced using OP5 NSCLIENT 0.3.9.328
 
This has been tested against a Window 7 host, and a Windows 2008 Server. both 64 bit.
 
At the time of reproducing the file Johan.gz is about 7 minutes old.
 
Outtake from OP5.INI
 Arkiv1=inject CheckFile2 ""path=C:\johan test"" pattern=*.gz MaxCrit=1 filter+written=>1h 
This will show all files, even if it is younger than 1 hour.
 
[root@op5labb plugins]# ./check_nrpe -H 172.16.X.X -c Arkiv1
 johan.gz, op5-monitor-software-install-5.5.3.1-x86_64.tar.gz, test - Kopia.gz, test.gz|'found files'=4;0;1
 
Outtake from OP5.INI
 Arkiv1=inject CheckFile2 ""path=C:\johan test"" pattern=*.gz MaxCrit=1 
filter+written=<1h 

Will find no files, even if they are younger than 1 hour.
 
[root@op5labb plugins]# ./check_nrpe -H 172.16.X.X -c Arkiv1
 CheckFile ok|'found files'=0;0;1
 
Various versions of NSCLINT config has been tested using the documentation below. nothing seems to trigger the age filter.
 
The documentation says
 
www.nsclient.org/nscp/wiki/CheckFile2
 
Filter Types
 <filter type> Values Description
 size number The size of the file
 creation time expression? The date/time the file was created
 written time expression? The date/time the file was last updated
 accessed time expression? The date/time the file was last accessed
 version string expression? The exe file version
 line-count number Number of lines (in a text file)
 time expression
 
A time expression is a date/time interval as a number prefixed by a filter prefix (<, >, =, <>) and followed by a unit postfix (m, s, h, d, w). A few examples of time expression are: filter+generated=>2d means filter will match any records older than 2 days, filter+generated=<2h means match any records newer then 2 hours. Warning, the bash interprets the ""<,>,!"". Use the ""\"" to avoid this. e.g. filter+generated=\>2d . On the Client activate the ""Nasty Metachars"" Option, to allow the \. 



",Johan
NRPE Component,598,NSClient++ for Windows 2012 server,NRPE,0.4.1,0.4.2,enhancement,Feature Requests,mickem,new,2013-01-23T11:29:41+01:00,2013-01-23T11:42:04+01:00,"Hello,
Firstly, congratulations on NSClient + + that we use with Nagios to monitor our Windows servers.
We currently have a fleet in 2003 and 2008 R2. Do you plan to change NSClient + + for windows 2012 server?
I look with my direction if it would be possible to make for you a contribution. I will back to you.
Best regards.
C. Chopard",Lachope52
NSCA Component,632,NSCP-0.4.1.90 bug connection refused with windows server,NSCA,0.4.1,,defect,Bugs,mickem,new,2013-05-09T11:29:07+02:00,2013-05-09T11:29:07+02:00,"Hi,
I installed NSCP-0.4.1.90 on windows and it work great, but some time the service of NSCP go down and it give me ""connection refused with host"" on nagios interface.
when i check the log file of NSCP there is an error that say ""NSCLient++.cpp can't find the NRPE.dll File on the module repository""
can you help me please ",meds.3i
NSCA Component,633,NSCAClient fails to load crashing nsclient++ if custom hostname used,NSCA,0.4.1,,defect,Bugs,mickem,new,2013-05-13T14:28:41+02:00,2013-05-13T14:28:41+02:00,"Since the RC .99 and .100 releases, the use of


{{{
[/settings/NSCA/client]
hostname=n
}}}


For any value of ''n'' that is not ""auto"" causes the client to crash when loading the plugin.


{{{
d de\socket/server.hpp:162  Attempting to bind to: :5666
d rvice\NSClient++.cpp:844  Loading plugin: NSCAClient
}}}

This is on an x64 windows7 machine used to test releases prior to rollout (the same behaviour was noted with the x86 binary).
",mbajzh
NSCA Component,608,Support NSCA-ng protocol,NSCA,0.4.1,0.4.3,enhancement,Feature Requests,mickem,assigned,2013-03-16T17:12:01+01:00,2013-03-23T23:35:55+01:00,"There is a new NSCA server available called ""NSCA-ng"" (http://www.nsca-ng.org/), which allows per-client passwords. It would be great if NSClient++ could be used to send results to an NSCA-ng server.",shadowconnect
None Component,600,ERROR: Failed to get mutex for PdhValidatePath,None,0.4.1,,defect,Bugs,mickem,new,2013-01-24T16:07:11+01:00,2013-03-19T14:13:23+01:00,"Hi,

nsclient++ Version: 0,4,1,73 2012-12-17

ich bekomme auf einem Windows 2008 64 Bit Server regelmässig folgende Fehlermeldung von mehreren Service Checks:

ERROR: Failed to get mutex for PdhValidatePath

Die Meldung kommt unabhängig davon, ob ich den Check im Icinga als Active Check konfiguriere, oder ob ich den Check in der nsclient.ini als schedule und im Icinga als Passive Check definiere.
Im 2.ten Fall sieht die Meldung im event.log wie folgt aus:

[01-24-2013 15:44:04] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;HOSTNAME;processor_user;3;ERROR: Failed to get mutex for PdhValidatePath (proc|\Processor(_total)\% User Time)

Die Konfig in der nsclient.ini sieht wie folgt aus:
{{{
[/settings/external scripts/alias]

; alias_check_processor_user
alias_check_processor_user = CheckCounter ""\\Processor(_total)\\% User Time"" ShowAll MaxWarn=50 MaxCrit=80

; Scheduler definition
[/settings/scheduler/schedules/default]
interval=1m

[/settings/scheduler/schedules]
processor_user = alias_check_processor_user
}}}
Auf 40 anderen Servern funktioniert das ganze ohne Probleme.

Bug im nsclient, bug im Windows, beides ???

Für einen Tip wäre ich dankbar.

Viele Grüße
Greg",greg
None Component,602,returned an invalid return code: -1073741819,None,0.4.1,,defect,Bugs,,new,2013-02-06T16:03:20+01:00,2013-03-20T06:54:14+01:00,"Some times I receve error of ""returned an invalid return code: -1073741819"" when I use check_ad.vbs for do checks.  This problem occurs more that 10 times by day. 

Error:
======================================================
[1360154240] SERVICE ALERT: ti-ad02;AD SysVolCheck;OK;HARD;2;OK - SysVolCheck: OK.
[1360161000] SERVICE ALERT: ti-ad02;AD SysVolCheck;UNKNOWN;SOFT;1;The command (cscript \scripts\check_ad.vbs //nologo /test:SysVolCheck) returned an invalid return code: -1073741819
[1360161059] SERVICE ALERT: ti-ad02;AD SysVolCheck;OK;SOFT;2;OK - SysVolCheck: OK.
======================================================

Thanks.
",fernando.benatti
None Component,611,Problems passing arguments with white space to custom external script,None,0.4.1,,defect,Bugs,,new,2013-03-28T11:30:38+01:00,2013-03-28T11:31:21+01:00,"I have a problem passing parameters with white/blank spaces to an external script.

This is my nsconfig.ini file:


{{{

#   nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
#   nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help


; Undocumented section
[/modules]

; 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.
NRPEServer = 1

; NSCAClient - Passive check support over NSCA.
NSCAClient = 1

; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1


; Undocumented section
[/settings/default]

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 192.168.20.251


; 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)
[/settings/external scripts/alias]

; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s

; alias_cpu_ex - Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s

; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED

; alias_disk_loose - Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable

; alias_event_log - Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 ""filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'"" truncate=800 unique descriptions ""syntax=%severity%: %source%: %message% (%count%)""

; alias_file_age - Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_file_age = checkFile2 filter=out ""file=$ARG1$"" filter-written=>1d MaxWarn=1 MaxCrit=1 ""syntax=%filename% %write%""

; alias_file_size - Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_file_size = CheckFiles ""filter=size > $ARG2$"" ""path=$ARG1$"" MaxWarn=1 MaxCrit=1 ""syntax=%filename% %size%"" max-dir-depth=10

; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page

; alias_process - Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process = checkProcState ""$ARG1$=started""

; alias_process_count - Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ ""$ARG1$=started""

; alias_process_hung - Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 ""$ARG1$=hung""

; alias_process_stopped - Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_process_stopped = checkProcState ""$ARG1$=stopped""

; alias_sched_all - Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_sched_all = CheckTaskSched ""filter=exit_code ne 0"" ""syntax=%title%: %exit_code%"" warn=>0

; alias_sched_long - Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_sched_long = CheckTaskSched ""filter=status = 'running' AND most_recent_run_time < -$ARG1$"" ""syntax=%title% (%most_recent_run_time%)"" warn=>0

; alias_sched_task - Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_sched_task = CheckTaskSched ""filter=title eq '$ARG1$' AND exit_code ne 0"" ""syntax=%title% (%most_recent_run_time%)"" warn=>0

; alias_service - Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service = checkServiceState CheckAll

; alias_service_ex - Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_service_ex = checkServiceState CheckAll ""exclude=Net Driver HPZ12"" ""exclude=Pml Driver HPZ12"" exclude=stisvc

; alias_up - Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_up = checkUpTime MinWarn=1d MinWarn=1h

; alias_updates - Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
alias_updates = check_updates -warning 0 -critical 0

; alias_volumes - Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED

; alias_volumes_loose - Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable 

; default - Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
default = 

[/settings/NRPE/server]
allow arguments=true
allow nasty characters = true

[/settings/external scripts]
allow arguments=true

[/settings/external scripts/scripts]
restart_service=scripts\\restart_service.bat ""$ARG1$""

}}}



The batch file contains (for testing purposes) only this line:

{{{
echo %1 > C:\test.txt
}}}

Even if I use this command:

{{{

./check_nrpe -H 192.168.20.20 -p 5666 -c restart_service -a ""Print Spooler""
}}}

Or I run nsclient++ in test mode and I inject this command:

{{{

restart_service ""Print Spooler""
}}}

The result is the same, the content of ""C:\test.txt"" file is always only ""Print"" (without quotes)

I'm using NSClient++ 0.4.1.90 on a x64 server

Thanks for any suggestion!


",Shagrat
None Component,613,CheckCPU load erroneously rises to 20%,None,0.4.1,,defect,Bugs,,new,2013-04-05T18:43:56+02:00,2013-04-07T11:40:42+02:00,"We've been experiencing a strange issue with nsclient++ where the CheckCPU performance monitor will ramp up from 0% to ~20% on a unloaded Windows 2008R2 x64 box. If we restart nsclient++, the load being reported will drop back down to 0% but then begin climbing back up to the ~20% range. During this time the load on the box is 0%, confirmed through taskmanager.",slmingol
None Component,618,Connection refused by host,None,0.4.1,,defect,Bugs,,new,2013-04-12T17:38:35+02:00,2013-04-12T17:38:35+02:00,"Hello I just installed nsclient on 2 VM but 1 is giving me this error:
""Connection refused by host"" on all my NSclient monitoring tasks. Firewall is turned off and checking the log file I got these messages:

2013-04-11 18:35:18: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.


2013-04-11 18:35:19: e:..\..\..\..\trunk\modules\CheckSystem\PDHCollector.cpp:139: Failed to query performance counters: PdhCollectQueryData failed: : -2147481643: No data to return.

Could you help me please ???

Thanks !!!",mcastrot45
None Component,621,NSClient wont kill Process on Restart,None,0.4.1,,defect,Bugs,,new,2013-04-16T12:07:49+02:00,2013-04-16T12:07:49+02:00,"Hello,

ich have expirienced some issues with version 4.1.90 on a Windows Server 2008R2. Wenn i restart the service, the old Process (PID) wont be killed properly, so i have to PIDs listening on Port 5666 and my Checks Time out. You can see it with netstat -ano | find ""5666"". The old PID is still listening and all checks try to communicate with the old Process and will hung uo in a CLOSE_WAIT state.

Best regards,
Daniel",DanieE
None Component,626,Scheduled task check on 2008 R2 and +,None,0.4.1,,defect,Bugs,,new,2013-04-27T12:05:39+02:00,2013-04-27T12:05:39+02:00,"Hello,

On Windows Server 2008 and >, task can be organized in folders.
I think your check doesn't check for subfolders, as one my tasks is failed (code 0x41301) but the plugin say that all tasks are good.

",mchateau
None Component,629,Performance data in % of CheckMem mixed up with used memory/memory left,None,0.4.1,,defect,Bugs,,new,2013-05-01T12:15:46+02:00,2013-05-01T12:15:46+02:00,"The following samples come from a system with 8G of RAM and 3.23G usage:

./check_nrpe -H xxx -c CheckMem -a MaxWarn=5120M MaxCrit=5632M ShowAll type=physical
OK: physical memory: 3.23G|'physical memory %'=40%;37;31 'physical memory'=3.22699G;5;5.5;0;8

Above there is shown 'physical memory %'=40%;37;31 where 40% is used memory and 37;31 are memory left thresholds.
As you can see below the defined thresholds compared against memory used and not memory free:

./check_nrpe -H xxx -c CheckMem -a MaxWarn=2048M MaxCrit=3584M ShowAll type=physical
WARNING: physical memory: Total: 8G - Used: 3.23G (40%) - Free: 4.77G (60%) > warning|'physical memory %'=40%;74;56 'physical memory'=3.22699G;2;3.5;0;8

From my point of view it should show: 'physical memory %'=40%;26;44 or 'physical memory free%'=60%;74;56

Maybe the following would be related to this:
Probably there should be a toggle for check against memory free or memory used. As long as you use percentage values there will be no problem but as soon as you want to define a fixed value of ""always 2GB free"" you're bumped. In times of virtual machines this can happen often.""

I didn't check this on other commands like CheckDisk. Maybe it is there the same way, too.",shiftycent
None Component,601,Version number in MSI package name,None,0.4.1,,enhancement,Feature Requests,,new,2013-01-30T19:21:07+01:00,2013-01-31T21:59:04+01:00,"I use Puppet on Windows to push out packages. Puppet has a somewhat limited way of upgrading MSIs. 

If we could get the version number in the package name so that instead of ""NSClient++ (x64)"" we ended up with e.g. ""NSClient++ (x64) 0.4.1.73"", I think Puppet will be able to auto-deploy it.

Is this possible?

Thanks!",internetstaff
None Component,589,CheckMultiple; CheckCounter and performance data parsing,None,0.4.1,0.4.1,defect,Bugs,mickem,new,2012-12-18T09:39:33+01:00,2013-01-10T16:52:05+01:00,"Hello. I have some performance counter to check. So i put in nsclient.ini
{{{
check_mem_cached_bytes=CheckCounter ""\Arbeitsspeicher\Cachebytes"" MaxCrit=314572800 ShowAll
check_mem_committed_bytes_in_use=CheckCounter ""\Arbeitsspeicher\Zugesicherte verwendete Bytes (%)"" MaxWarn=60 MaxCrit=80 ShowAll
}}}

To get all performance counter objects in one go, i add in nsclient.ini:
{{{
check_mem_combined=CheckMultiple command=check_mem_cached_bytes command=check_mem_committed_bytes_in_use
}}}

From my NAGIOS host I'am able to query the single CheckCounter commands with correct performance data results:
{{{
./check_nrpe -H [myhost] -c check_mem_cached_bytes
OK: \Arbeitsspeicher\Cachebytes: 1.73351e+008|'\Arbeitsspeicher\Cachebytes'=173350912;0;314572800
}}}

and:
{{{
./check_nrpe -H [myhost] -c check_mem_committed_bytes_in_use
OK: \Arbeitsspeicher\Zugesicherte verwendete Bytes (%): 16.2615|'\Arbeitsspeicher\Zugesicherte verwendete Bytes (%)'=16.26154;60;80
}}}

If I query the combined check, I get this result with scrambled performance data strings:
{{{
./check_nrpe -H [myhost] -c check_mem_combined
OK: \Arbeitsspeicher\Cachebytes: 1.72495e+008, OK: \Arbeitsspeicher\Zugesicherte verwendete Bytes (%): 16.2347|'\Arbeitsspeicher\Cachebytes'=172494848;0;314572800 'verwendete'=0 'Bytes'=0 '(%)''=16.23469;60;80
}}}

As you can see, the CheckMultiple command splits the 'committed bytes in use' counter performance data into three strings:
'verwendete'=0 'Bytes'=0 '(%)''=15.9182;60;80

In versions prior 0.4 I get correct results (one string per check command).

Maybe there is a workaround. 

Thanks in advance for your help. 
Carsten",CaSi72
None Component,597,Reloading breaks NRPE server,None,0.4.1,0.4.1,defect,Bugs,mickem,new,2013-01-21T14:03:15+01:00,2013-01-21T19:03:20+01:00,"Ok, here is the procedure on a Windows 2003 Server :

1)	Starting the server (nscp test)
2)	From remote Linux, run “/usr/lib64/nagios/plugins/check_nrpe -H 192.168.100.128 -n -p 3180”
I (0,4,1,87 2013-01-17) seem to be doing fine...
3)	Run “/usr/lib64/nagios/plugins/check_nrpe -H 192.168.100.128 -n -p 3180 -c reload_nrpe”
CHECK_NRPE: Socket timeout after 10 seconds.

From that point, the server is not accessible anymore.

----

Here is a paste of the logs (shown in console) :

{{{
d rvice\NSClient++.cpp:960  Injecting: reload_nrpe...
l /lua/test_reload.lua:2    Changing configuration and reloading NRPE.
d mpl/settings_ini.hpp:253  Loading: C:/NSCP-0.4.1.87-win32//nsclient.ini
d ngs_manager_impl.cpp:73   Creating instance for: ini://${exe-path}/local/commun.ini
d mpl/settings_ini.hpp:287  Reading INI settings from: C:/NSCP-0.4.1.87-win32//local/commun.ini
d mpl/settings_ini.hpp:253  Loading: C:/NSCP-0.4.1.87-win32//local/commun.ini
e s_interface_impl.hpp:154  Failed to load child: Failed to get mutex, cant get settings instance
d ngs_manager_impl.cpp:73   Creating instance for: ini://${exe-path}/local/specif.ini
d mpl/settings_ini.hpp:287  Reading INI settings from: C:/NSCP-0.4.1.87-win32//local/specif.ini
d mpl/settings_ini.hpp:253  Loading: C:/NSCP-0.4.1.87-win32//local/specif.ini
e s_interface_impl.hpp:154  Failed to load child: Failed to get mutex, cant get settings instance
d mpl/settings_ini.hpp:253  Loading: C:/NSCP-0.4.1.87-win32//local/commun.ini
d rvice\NSClient++.cpp:985  Result reload_nrpe: OK
d rvice\NSClient++.cpp:806  Found module: nrpe_server, reloading (delayed).
d erver\NRPEServer.cpp:133  Allowed hosts definition:
d de\socket/server.hpp:114  Attempting to bind to: :3180
d de\socket/server.hpp:127  Bound to: :3180
e de\socket/server.hpp:163  Socket ERROR: L'opration d'entre/sortie a t abandonne en raison de l'arrt d'un thread ou  la demande d'une application
}}}

The translation for the last error message (in french) is something like :
“ Socket Error : Input/ouput operation has been cancelled because a thread has stopped or by application request “


",Orabig
None Component,570,Wish to get Top 'n' CPU & Memory consuming process details using nscp agent,None,0.4.0,0.4.2,enhancement,Bugs,mickem,new,2012-11-09T08:21:21+01:00,2012-11-11T22:22:04+01:00,"It will help us a lot if this feature can be developed or incorporated in nscp agent to provide the TOP 'n' CPU/MEMORY consuming process details whenever it reports WARNING/CRITICAL state for CPU & Memory as it will help the system admins a lot to pin point the root cause of these threshold breaches. Presently we know that CPU & Memory is high but we never know beacuase of what. Manytimes we are asked by system-admins and the server owners what caused this high CPU/Memory and we could not find the answer right at the that time without logging in to the server. Also it can be the case we don't have priviledge to log in to the server and check for the exact root cause, If we can get these information right inside the Nagios with the help of nscp it will be a great help.",manikumar85
None Component,576,NSClient Error: PDH.dll Collect CPU - ERROR: 0x800007D6,None,0.4.0,0.4.2,defect,Bugs,,new,2012-11-21T13:34:34+01:00,2012-11-21T13:37:58+01:00,NSClient Error: PDH.dll Collect CPU - ERROR: 0x800007D6,sharath patel
None Component,604,[/includes] doesn't work,None,0.4.1,0.4.2,defect,Bugs,mickem,assigned,2013-02-19T13:39:16+01:00,2013-03-19T14:05:20+01:00,"LS,

  when I enter the following into nsclient.ini:

[/includes]
nscp-vanderlande-0.4.ini

And nscp settings --validate run, I get the following error:

nsclient++$ ./nscp settings --validate
Invalid path: /includes

Or: how do I use [/includes]? The documentation is rather vague about this...",edgarmat
None Component,605,Why does --validate report errors while the configuration works?,None,0.4.1,0.4.2,defect,Bugs,mickem,assigned,2013-02-19T15:35:47+01:00,2013-03-19T14:07:26+01:00,"LS,

  I've got the following configuration in nsclient.ini:

{{{
[/modules]
CheckExternalScripts = enabled

; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1

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

[/settings/external scripts]
timeout = 60
allow arguments = 1

; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]


; A list of wrappped scripts (ie. using the template mechanism)
[/settings/external scripts/wrapped scripts]
check_battery=check_battery.vbs
restart_failed_services=restart_failed_services.ps1 $ARG1$

; A list of templates for wrapped scripts
[/settings/external scripts/wrappings]

; BATCH FILE WRAPPING -
bat = scripts\\%SCRIPT% %ARGS%

; POWERSHELL WRAPPING -
ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -executionpolicy remotesigned -command -

; VISUAL BASIC WRAPPING -
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
}}}

Running {{{nscp settings --validate}}} reports these errors:
{{{
Invalid key: /settings/external scripts/wrapped scripts.check_battery
Invalid key: /settings/external scripts/wrapped scripts.restart_failed_services
Invalid key: /settings/external scripts/wrappings.bat
Invalid key: /settings/external scripts/wrappings.ps1
Invalid key: /settings/external scripts/wrappings.vbs
}}}

Yet, if I run {{{check_nrpe -H localhost -c check_battery}}}, I get a valid answer:
{{{
OK: Battery OK - Charge Remaining = 98%|'charge'=98
}}}

Any thoughts?

Kind regards, Edgar Matzinger.",edgarmat
None Component,595,ODBC connection check,None,0.4.1,0.4.2,enhancement,Feature Requests,,new,2013-01-18T21:30:50+01:00,2013-01-18T21:30:50+01:00,I chatted with Michael Medin and he asked me to put in a ticket to add an ODBC check in 0.4.2. Thanks a bunch! :-),LanceEG
None Component,577,NSClient Error: PDH.dll Collect CPU - ERROR: 0x800007D6,None,0.4.0,0.4.2,defect,Support Requests,,new,2012-11-21T13:46:43+01:00,2012-11-21T14:01:32+01:00,"Hi,

With the NSClient I am getting the below error ""NSClient Error: PDH.dll
> > Collect CPU - ERROR: 0x800007D6 (multiple)"".
> > > It fills up the application log within a day.  Does anybody have any idea",sharath patel
None Component,615,"receive ""Connection refused"" from check_nt when 2 or 3 nics are installed in Windows 2008 R2",None,0.4.1,0.4.3,defect,Bugs,,new,2013-04-09T20:11:51+02:00,2013-04-09T20:39:47+02:00,"CRITICAL - Socket timeout after 10 seconds
could not fetch information from server

our server as 3 network cards configure and it seem to create problem for get the answer back to the Nagios server. It is really a intermitent problem, it work often correctly.

But suddently it can get to the server and we receive error message report above.
",chapy
None Component,606,Attempting to start/stop the service using nscp.exe fails due to it using the old service name,None,0.4.1,future,defect,Bugs,,new,2013-03-01T01:05:17+01:00,2013-03-01T01:05:17+01:00,"Attempting to start/stop the service using nscp.exe fails due to it using the old service name.  Here is the output from a cmd prompt:

C:\Program Files\NSClient++>nscp service --start
ERROR: Service failed to start: OpenService on 'NSClientpp' failed: 1060: The specified service does
 not exist as an installed service.

C:\Program Files\NSClient++>nscp service --stop
ERROR: Service failed to stop: OpenService failed: 1060: The specified service does not exist as an
installed service.
",Brain2000
None Component,183,Check_http from NSClient++,None,0.3.1,future,enhancement,Feature Requests,mickem,new,2008-06-03T16:52:45+02:00,2012-02-16T20:09:55+01:00,"Just as a reminder from the post in the 'Question'-section. Something similar to check_http would be a real treat to have accessible from nsclient++ so that one could check not only if a http-server is reachable from nagios, but from monitord clients as well.",Azzid
None Component,443,check_ping and check_tcp,None,0.3.8,future,enhancement,Feature Requests,mickem,new,2011-04-06T11:22:31+02:00,2013-04-16T15:39:32+02:00,"I think two of the most common checks on a host. It exists as cygwin compiled plugin for windows, but the main difference between two independent plugins and a module for NSClient++ is not even needed to re-read the plugin binary in every check letting a lightness increase in monitoring performance for big monitored infrastructures by distributing the resources consumption to every host(diskio transactions, cpu charge...); and either centralize the checks' configuration for the hosts in the monitoring host for a simple management, just as all of the others modules.

Would be possible to add this?",deisecairo
None Component,535,RAID Status,None,0.3.9,future,enhancement,Feature Requests,mickem,new,2012-06-11T04:38:37+02:00,2012-07-12T13:29:58+02:00,"I want to check raid status on my windows server through nsclient++.
But I didn't found any command to do so. Can you help me with this",agrover
None Component,580,specified object not found,None,0.4.0,0.4.2,defect,Support Requests,,new,2012-11-26T19:04:27+01:00,2012-11-26T23:09:33+01:00,"previously added checks on counters that have worked are failing after a hardware upgrade:


{{{
012-11-26 12:50:06: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: \ISE.ExegyAPIWrapper.Sessions(LVC2_ODS.01p_sess_0)\Messages/sec: PdhAddCounter failed: The specified object was not found on the computer.   (C0000BB8) (\ISE.ExegyAPIWrapper.Sessions(LVC2_ODS.01p_sess_0)\Messages/sec|\ISE.ExegyAPIWrapper.Sessions(LVC2_ODS.01p_sess_0)\Messages/sec)
2012-11-26 12:50:10: error:modules\CheckSystem\CheckSystem.cpp:1084: ERROR: Counter not found: \ISE.ExegyAPIWrapper.Sessions(lvc2_ods.06p_sess_0)\Messages/sec: The specified object was not found on the computer.   (C0000BB8)
2012-11-26 12:50:10: error:modules\CheckSystem\CheckSystem.cpp:1086: ERROR: Counter not found: \xxx.APIWrapper.Sessions(xxx2_xxx.06p_xxx_0)\Messages/sec: The specified object was not found on the computer.   (C0000BB8)
2012-11-26 12:50:10: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: \xxx.APIWrapper.Sessions(xxx2_xxx.06p_xxx_0)\Messages/sec: PdhAddCounter failed: The specified object was not found on the computer.   (C0000BB8) (\xxx.APIWrapper.Sessions(xxx2_xxx.06p_xxx_0)\Messages/sec|\xxx.APIWrapper.Sessions(xxx2_xxx.06p_xxx_0)\Messages/sec)
}}}

however these counters are all present on the node, and are available via perfmon.


{{{
\xxx.APIWrapper.Sessions(xxx2_xxx.06p_xxx_0)\Messages/sec
}}}

and are reporting numbers correctly.  any time I attempt to run a check_nt to the remote node the above errors are generated.

all nodes are Windows 2008 R2 Standard SP1
",kotterbein
None Component,619,NSCP v.0.4.1.90 64 bit does not respond well to requests through internet connection,None,0.4.1,0.4.2,defect,Support Requests,,reopened,2013-04-15T12:08:39+02:00,2013-04-24T06:42:57+02:00,"Hello.
I have been using Nagios and nsclient for a while now with versions 0.3.8 and 0.3.9. 
I have just upgraded to nagios 3.5 (current release).
I have removed the nsclient software from all my windows machinces and installed version 0.4.1.90 64 and 32 bit (where the OS was respectively 64 bit or 32 bit). It works just fine everywhere except 3 servers which are located outside my enterprise network, on a hosting provider. I am communicating with those servers through an internet connection. Along that path there are firewalls (both mine and the provider's), proxies, IPS etc. The 0.3.9.x versions of nsclient were communicating fine. With 0.4.1.90 I am either getting no response (server is responding but nothing responds to check_nt commands) or crazy responses like when the server responds to check version but doesn't send back any data (""No output returned from plugin"").
The 12489 port is open (that's how I was communicating so far). 
I asked the ISP if he was enforcing any packet filtering and the answer was no.
Is that a known issue? I have searched but haven't yet produced any results.
I have downgraded my servers again to 0.3.9.0 except one which I am keeping with errors in case I find a fix. 
I do appologize, I do not know what priority I should apply to this ticket, so I am applying something around the middle.",itheodoridis
None Component,584,Include date in NSC log name,None,0.4.0,0.4.2,enhancement,Feature Requests,,new,2012-11-28T15:42:46+01:00,2012-11-28T15:42:46+01:00,"Hi,

Thanks for your client.

I would ask to include date in NSC log name, if possible.

Settings example:
[/settings/log]
{{{
file name = ${exe-path}/../logs/%Y%m-nsclient.log
}}}
or
{{{
file name = ${exe-path}\\..\\logs\\%Y%m-nsclient.log
}}}",vzenin
VisualBasic Component,424,"modifications to NagiosPlugin.vbs, example script",VisualBasic,0.3.8,0.4.2,enhancement,Bugs,mickem,new,2010-12-23T11:19:41+01:00,2012-11-16T07:22:37+01:00,"modified Version of NagiosPlugin.vbs which came with nsclient++ vers. 0.3.8.76

- compares bounds to double values, so 10 comes after 9 (numeric sorting)

- bounds definition conforms to nagios plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT)

and an example script to check files in a directory (and its subdirs)",fuwe
check_nt Component,566,CheckServiceState at Windows 2012 Server,check_nt,0.3.9,0.4.2,defect,Bugs,mickem,new,2012-10-22T09:55:43+02:00,2012-11-17T11:02:37+01:00,"Windows 2012 Server introduced a new type of auto-started service called Automatically Started Triggered service. Such service is marked as automatically started, but it is really started when it is triggered by some system event and can be stopped on another event. So it is not the real automatically started service as we know it from the previous versions of Windows. This is the source of the problem, because the NSClient misreports the service as being failed to start when it is not running. Can be the NSClient adapted to this new feature of Windows 2012 Server by ignoring status of this type of services?
",davidl
installer Component,588,"The start, stop and test shortcuts open the ""C:\Program Files\NSClient++"" folder in explorer",installer,0.4.1-nightly,0.4.2,defect,Bugs,mickem,new,2012-12-17T10:17:52+01:00,2012-12-17T10:20:02+01:00,"I install nsclient using NSCP-0.4.1.72-Win32.msi or NSCP-0.4.1.72-x64.msi.

Then I click on start, programs, nsclient++, Start NSClient++.
This opens the ""C:\Program Files\NSClient++"" folder in explorer. The service doesn't start.
The 'stop' and 'test' shortcuts have the same problem.
I can stop and start nsclient using services.msc without any problems.

When I open the 'properties' of the 'start' shortcut, the target is as follows:
""C:\Program Files\NSClient++"" service --name nscp --start

When I change it to:
""C:\Program Files\NSClient++\nscp.exe"" service --name nscp --start
the shortcut works as expected.

The 'stop' and 'test' shortcuts need the same change.",mstol
