can't read *log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

can't read *log

Post 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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: can't read *log

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: can't read *log

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: can't read *log

Post 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?
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: can't read *log

Post by ariarlet »

can't read [path].log
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: can't read *log

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: can't read *log

Post by ariarlet »

how can i enable the debug logging?


thak you
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: can't read *log

Post 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:

Code: Select all

cd [NSClient path]

Code: Select all

nscp stop

Code: Select all

nscp test
If you're using an older version, replace 'nscp' with 'nsclient++' or whatever the executable may be called.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: can't read *log

Post 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:

Code: Select all

cd [NSClient path]

Code: Select all

nscp stop

Code: Select all

nscp test
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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: can't read *log

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked