I spent some time testing this, and it does work properly for me.
I want you to make sure of the following:
-You're running the latest version of NSClient (0.4.3.143)
-Your NSClient configuration is saved, and the NSClient service is in a stopped state
-Your NSClient configuration is proper - mine for reference:
Code: Select all
[/settings/logfile/real-time]
enabled = true
[/settings/logfile/real-time/checks/logfile]
file = c:/test/test.log
target=CACHE
filter = column1 like 'hello'
critical = column2 like 'world'
column split=;
[/settings/logfile/real-time/checks/logfile2]
file = c:/test/test2.log
target=CACHE
filter = column1 like 'hallo'
critical = column2 like 'wurld'
column split=;
After you have verified that your configuration is proper and NSClient is up to date, I want you to start NSClient in test mode from an administrative cmd prompt/powershell:
Code: Select all
cd c:\program files\nsclient++
nscp.exe test
After starting nscp, generate logs - one for each index - and make certain that they're being detected properly.
Code: Select all
echo hello;world >> c:\test\test.log
In your running 'nscp test prompt', you should see:
D cache Adding to index: logfile
And the other index:
Code: Select all
echo hallo;wurld >> c:\test\test2.log
D cache Adding to index: logfile2
At this point, you know that cached data exists on the server. Let's query from nrpe:
Code: Select all
[root@localhost libexec]# ./check_nrpe -H 192.168.x.x -c check_cache -a key=logfile
c:/test/test.log: 1 (hello, world , )|
[root@localhost libexec]# ./check_nrpe -H 192.168.x.x -c check_cache -a key=logfile2
c:/test/test2.log: 1 (hallo, wurld , )|
No issues on my end. Let me know if this helps.