Page 1 of 2

Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 3:46 am
by murawweh.daher
Hi,

i tried to use check_logfiles for new server with NSclient 0.4.4.15, but each time i run from nagios have "Unknown command(s): check_logfiles" error.
i inserted alias check_logfiles in nscp.ini, but it seem didn't work normally.

kindly your help.

Re: Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 12:01 pm
by lmiltchev
Can you show us the actual command that you run from the command line along with the output of it? Also, post the nsclient.ini file. Remove sensitive info (IPs, passwords).

Re: Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 1:09 pm
by murawweh.daher
Hi,

i run check_logfiles from remote host and give me output as below (i already test it for text file and worked).
C:\Program Files\NSClient++\scripts>check_logfiles.exe
Usage: check_logfiles [-t timeout] -f <configfile> [--searches=tag1,tag2,...]
check_logfiles [-t timeout] --logfile=<logfile> --tag=<tag> --rotation=<rotation> --criticalpattern=<regexp> --warningpattern=<regexp>

in Nagios server the result was as below.
[root@nms libexec]# /usr/local/nagios/libexec/check_nrpe -H xxxxxx -c check_logfiles
Unknown command(s): check_logfiles

Re: Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 1:38 pm
by lmiltchev
Did you get the plugin from the website listed below?

https://labs.consol.de/nagios/check_logfiles/

According to the instructions on this page, if you use NSClient++ under Windows, you should define "check_logfiles" in NSC.ini (or nsclient.ini) as such:

Code: Select all

check_logfiles=C:\Perl\bin\perl C:\libexec\check_logfiles --config $ARG1$
Currently, you have:

Code: Select all

alias_check_logfiles = check_logfiles

Re: Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 2:09 pm
by murawweh.daher
Hi,

after modify the nsclient.ini file i have new error in remote host nsclient.log.

error:c:\source\nscp\include\socket/connection.hpp:243: Failed to establish secure connection: unknown protocol: 252

Re: Unknown command(s): check_logfiles

Posted: Mon Dec 14, 2015 4:39 pm
by hsmith
That sounds like it may be an NSClient issue.. Have you tried 0.4.3? That's generally the one that we recommend.

Re: Unknown command(s): check_logfiles

Posted: Tue Dec 15, 2015 1:30 am
by murawweh.daher
Hi,

i install the latest today and i have new error.
Request arguments contained illegal metachars!

i will keep search on same issue and update.

Re: Unknown command(s): check_logfiles

Posted: Tue Dec 15, 2015 10:23 am
by rkennedy
Can you post your NSClient configuration again now that you've updated?

Re: Unknown command(s): check_logfiles

Posted: Tue Dec 15, 2015 10:00 pm
by Box293
Open a command prompt

Code: Select all

cd "\Program Files\NSClient++\"
nscp settings --activate-module NRPEServer --add-defaults
nscp settings --path /settings/NRPE/server --key "allow arguments" --set true
nscp settings --path /settings/NRPE/server --key "allow nasty characters" --set true
nscp settings --path /settings/NRPE/server --key insecure --set true
Restart the NSClient++ Service

Does this fix your problem?

Re: Unknown command(s): check_logfiles

Posted: Wed Dec 16, 2015 1:30 am
by murawweh.daher
Hi,

kindly find the attached nsclient.ini file.

i run also the commands, but there is no output this time.

[root@nms libexec]# /usr/local/nagios/libexec/check_nrpe -H xxxxxx -c check_logfiles -a "--logfile=\"D:\\`date +%Y%m%d`-Sms.log\" --warningpattern=Exception --noprotocol --warningthreshold=1 --type=simple"
[root@nms libexec]#