Check_log3.exe Windoes setup
Check_log3.exe Windoes setup
On the Windows side, I've tested this using check_log3.exe instead of check_log3.pl. Check_log3.exe can be downloaded here: http://sourceforge.net/projects/pma-oss ... s-plugins/
You will need to have NSClient running on your Windows Servers. You can download NSClient here: http://www.nsclient.org/download/
Once downloaded, you'll need to adjust nsclient.ini - I used the following configuration:
[/modules]
NSClientServer = 1
CheckSystem = 1
CheckDisk = 1
NRPEServer = 1
[/settings/NRPE/server]
use ssl = 1
payload length = 1024
allow nasty characters = false
allowed ciphers = ADH
ssl = 1
allow arguments = 1
insecure = 1
[/settings/external scripts/scripts]
check_log3 = scripts\check_log3.exe "-p somestring" "-l C:\testlog" "-c 1" --no-timeout
Then restart NSclient on the windows box with an administrative cmd prompt:
CODE: SELECT ALL
net stop nscp
net start nscp
Once it's restarted, you can call the Windows machine in much the same way you'd call a linux box:
CODE: SELECT ALL
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_log3
OK: Found 0 lines (limit=1/1): No matches found.|'lines'=0
I have tried this and get the error UNKNOWN: No handler for that command
You will need to have NSClient running on your Windows Servers. You can download NSClient here: http://www.nsclient.org/download/
Once downloaded, you'll need to adjust nsclient.ini - I used the following configuration:
[/modules]
NSClientServer = 1
CheckSystem = 1
CheckDisk = 1
NRPEServer = 1
[/settings/NRPE/server]
use ssl = 1
payload length = 1024
allow nasty characters = false
allowed ciphers = ADH
ssl = 1
allow arguments = 1
insecure = 1
[/settings/external scripts/scripts]
check_log3 = scripts\check_log3.exe "-p somestring" "-l C:\testlog" "-c 1" --no-timeout
Then restart NSclient on the windows box with an administrative cmd prompt:
CODE: SELECT ALL
net stop nscp
net start nscp
Once it's restarted, you can call the Windows machine in much the same way you'd call a linux box:
CODE: SELECT ALL
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_log3
OK: Found 0 lines (limit=1/1): No matches found.|'lines'=0
I have tried this and get the error UNKNOWN: No handler for that command
Re: Check_log3.exe Windoes setup
What version of NSClient are you using? Do you have the password and allowed hosts in place?
Code: Select all
[/settings/default]
allowed hosts = 192.168.x.x/24
password = nsclientRe: Check_log3.exe Windoes setup
the version is 2.15 and I have allowed host and passwords set up.
I have nagios setup for this server. I just wanna setup log monitoring now.
I have nagios setup for this server. I just wanna setup log monitoring now.
Re: Check_log3.exe Windoes setup
Under [modules], please add the following setting:
After adding the above, restart NSClient and perform your testing once more.
Code: Select all
CheckExternalScripts=enabledRe: Check_log3.exe Windoes setup
Still same issue.
Re: Check_log3.exe Windoes setup
Let's run NSClient in test mode. On your Windows box, open an administrative command prompt and perform the following procedure:
e.g. C:\Program Files\NSClient++
While the test output is going, attempt to perform the check from your Nagios box. What error is produced, if any? Is there any startup error? Post the output here.
Code: Select all
cd <NSClientDIR>Code: Select all
net stop nscp
nscp testRe: Check_log3.exe Windoes setup
nscp command does not exist/work
Can you give me all the steps from the begging so I can make sure that I did not miss anything.
Can you give me all the steps from the begging so I can make sure that I did not miss anything.
Re: Check_log3.exe Windoes setup
What is the version of the NSClient++ that you are running? If you are running an older version (i.e. 0.3.9), you may need to run:nscp command does not exist/work
Code: Select all
net stop nsclientpp
net start nsclientppFYI, I just tried the check and it worked just fine for me. I have it defined in the nsclient.ini file as such:
Code: Select all
check_log3 = scripts\check_log3.exe -l "c:\test.log" -p "failed"Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_log3.exe Windoes setup
what is the test log?
Re: Check_log3.exe Windoes setup
test.log can be any log on your system that you'd like to monitor.