Log line limit

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Log line limit

Post by Vins »

Hi,
I've noticed that in the log viewer it's possible to select more than 1000 lines to be displayed, but if you select for example 5000 no more than 1000 lines are displayed and at the end of the log it's displayed "LINE LIMIT OF 1000 LINES REACHED"...

It's happening only to me? :(
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

It's not a bug, it's a feature!

It's actually intentionally that way.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

rony wrote:It's not a bug, it's a feature!

:lol: :lol: :lol:

rony wrote:It's actually intentionally that way.
The max line length was 1000 in 0.8.6, then appeared 2000,3000,5000,10000 as a possible choice... no problem anyway, it's not so important

Thanks for clarifying

:)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If I remember correctly, the choice was given, but never honored :cry:
Reinhard
reisercl
Posts: 4
Joined: Tue Sep 09, 2008 11:35 am
Location: Zurich, Switzerland

Post by reisercl »

Is it possible to disable this limit of 1000 lines? Cause it's a problem for me, cause my log-file is a bit huge :P

Perhaps somewhere in the php code.


//EDIT
I got it:

open the file <cacti path>/site/utilities.php
search for "LINE LIMIT OF 1000 LINES REACHED"
You will find this:

Code: Select all

if ($j > 1000) {
   ?>
   <tr bgcolor='#EACC00'>
      <td>
         <?php print ">>>>  LINE LIMIT OF 1000 LINES REACHED!!  <<<<";?>
      </td>
   </tr>
   <?php

   break;
}
Then you only have to change the first line:

Code: Select all

if ($j > 1000) {
into:

Code: Select all

if ($j > 10000) {
And to make it perfekt, the line:

Code: Select all

<?php print ">>>>  LINE LIMIT OF 1000 LINES REACHED!!  <<<<";?>
into:

Code: Select all

<?php print ">>>>  LINE LIMIT OF 10000 LINES REACHED!!  <<<<";?>
Then save the file :P
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

Works! 8)

Same procedure to modify the clog plugin
User avatar
Tolaris
Posts: 17
Joined: Mon Nov 15, 2010 3:46 pm
Location: London, UK
Contact:

Re: Log line limit

Post by Tolaris »

Problem still exists as of Cacti 0.8.8a. Attached is a patch which does what reisercl suggests. It works.
Attachments
Cacti-0.8.8.a_log_limit_10000.patch
Patch to change log line limit to 10000.
(429 Bytes) Downloaded 92 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Log line limit

Post by gandalf »

Thx for the contribution.
But I'm sorry to say that it is by far better to create an entry at http://bugs.cacti.net. Those won't be skipped accidentally
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests