Page 1 of 2
can't read *log
Posted: Wed Apr 22, 2015 11:41 am
by ariarlet
I try to do a check to work remotely on windows . But when I want to read the log tells me I can not.
In the nsclient I have written
check_log3 = c:\perl.exe -p "ERROR" -l [path].log -c 1
and in the nagios i have written
check_nrpe -H (host) -p 5666 -c check_log3
what is the possible problem?
thank you
Re: can't read *log
Posted: Wed Apr 22, 2015 12:01 pm
by jolson
Are you running Nagios Core or Nagios XI? It looks like this post wound up in the wrong forum, and I would like to move it.
Re: can't read *log
Posted: Thu Apr 23, 2015 8:08 am
by ariarlet
jolson wrote:Are you running Nagios Core or Nagios XI? It looks like this post wound up in the wrong forum, and I would like to move it.
NAgios XI
Re: can't read *log
Posted: Thu Apr 23, 2015 2:43 pm
by jdalrymple
ariarlet wrote:I try to do a check to work remotely on windows . But when I want to read the log tells me I can not.
In the nsclient I have written
check_log3 = c:\perl.exe -p "ERROR" -l [path].log -c 1
and in the nagios i have written
check_nrpe -H (host) -p 5666 -c check_log3
what is the possible problem?
thank you
In order to help we'll need more terse information.
What error did you receive specifically when you ran check_nrpe from the Nagios server?
Re: can't read *log
Posted: Thu Apr 23, 2015 4:56 pm
by ariarlet
can't read [path].log
Re: can't read *log
Posted: Thu Apr 23, 2015 7:16 pm
by Box293
You may need to enable debug logging in NSClient++ and then restart NSClient++ service. Perform the test again and check the nsclient.log, post it here.
Re: can't read *log
Posted: Fri Apr 24, 2015 4:37 am
by ariarlet
how can i enable the debug logging?
thak you
Re: can't read *log
Posted: Fri Apr 24, 2015 10:23 am
by jolson
ariarlet,
Are you typing in '[path].log' literally, or are you using an actual path? If that information is not sensitive, it could be useful to know which path you're trying to monitor.
What version of NSClient are you using? If you're using a recent version, you can enable “test and debug” mode with the following commands:
If you're using an older version, replace 'nscp' with 'nsclient++' or whatever the executable may be called.
Re: can't read *log
Posted: Mon Apr 27, 2015 9:27 am
by ariarlet
jolson wrote:ariarlet,
Are you typing in '[path].log' literally, or are you using an actual path? If that information is not sensitive, it could be useful to know which path you're trying to monitor.
No, i don't writting this, I'm using a original path. xD
jolson wrote:ariarlet,
What version of NSClient are you using? If you're using a recent version, you can enable “test and debug” mode with the following commands:
If you're using an older version, replace 'nscp' with 'nsclient++' or whatever the executable may be called.
My version is older and this does work
Re: can't read *log
Posted: Mon Apr 27, 2015 9:41 am
by jolson
Open a command prompt as administrator and navigate to C:\Program Files\NSClient (or whatever directory your NSClient is in).
Next, type the below commands using the name of the NSClient executable - something like NSClient++.exe or nscp.exe:
Code: Select all
<executable> stop
<executable> test
This should start NSClient in testing mode - try running the check from the Nagios server and let us know what appears in the command prompt. Thanks!