Unknown command(s): check_logfiles

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Unknown command(s): check_logfiles

Post 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.
Regards,
Murawweh Daher
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unknown command(s): check_logfiles

Post 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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Re: Unknown command(s): check_logfiles

Post 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
You do not have the required permissions to view the files attached to this post.
Regards,
Murawweh Daher
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unknown command(s): check_logfiles

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Re: Unknown command(s): check_logfiles

Post 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
Regards,
Murawweh Daher
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Unknown command(s): check_logfiles

Post 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.
Former Nagios Employee.
me.
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Re: Unknown command(s): check_logfiles

Post 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.
Regards,
Murawweh Daher
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unknown command(s): check_logfiles

Post by rkennedy »

Can you post your NSClient configuration again now that you've updated?
Former Nagios Employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unknown command(s): check_logfiles

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Re: Unknown command(s): check_logfiles

Post 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]#
You do not have the required permissions to view the files attached to this post.
Regards,
Murawweh Daher
Locked