How to show multi-line of output using check_logfiles

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
nshah11
Posts: 8
Joined: Tue Oct 28, 2014 2:51 pm

Re: How to show multi-line of output using check_logfiles

Post by nshah11 »

I am using the following versions:

Nagios Core 4.0.1
Nagios-plugins-1.5
NRPE-2.15
check_logfiles (plugin)-3.6.2.1


Thanks
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: How to show multi-line of output using check_logfiles

Post by sreinhardt »

When run via cli, how is the output displayed from this check?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
nshah11
Posts: 8
Joined: Tue Oct 28, 2014 2:51 pm

Re: How to show multi-line of output using check_logfiles

Post by nshah11 »

Spenser,

I tried to run the command in the CLI of the monitored host and it works well. All the errors are being displayed on the screen.
So, basically it works fine on the CLI on the monitored host. But in the email notification some error lines are chopped out..

Thanks
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to show multi-line of output using check_logfiles

Post by lmiltchev »

Can you show us the notification command definition?
Be sure to check out our Knowledgebase for helpful articles and solutions!
nshah11
Posts: 8
Joined: Tue Oct 28, 2014 2:51 pm

Re: How to show multi-line of output using check_logfiles

Post by nshah11 »

Sorry for delayed response. I think there is a limit on the amount of data that can be transferred by nrpe (about 1KB). If the data exceeds than the limit for a particular check then the data is chopped off..

The best that can be done is to use $options = 'report=long'; in the log monitoring configuration file.

Thanks
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to show multi-line of output using check_logfiles

Post by Box293 »

Another alternative is to use check_by_ssh as it does not have the 1KB limitation.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nshah11
Posts: 8
Joined: Tue Oct 28, 2014 2:51 pm

Re: How to show multi-line of output using check_logfiles

Post by nshah11 »

Great! I will try that out. Thanks Box293
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: How to show multi-line of output using check_logfiles

Post by lgroschen »

Locking this. Please feel free to PM any of the support team or open a new topic.
/Luke
Locked