CACTI ADD NEW GRAPHS TIMEOUT / LAG FIX!

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

CACTI ADD NEW GRAPHS TIMEOUT / LAG FIX!

Post by pestilence »

One of the few (rather few) troubling issues of cacti was when trying to create New graphs for devices with a huge interface list (such as AS routers, BRAS routers etc).
My create new graphs page would stumble when trying to create new graphs for the specific devices, so i proceeded with a modification of the Add new graphs page.
The modified page (check attachement) will allow you to define a maximum number of interfaces per page, it will break them into several pages depending the Items polled.
This solved my lag / timeout problems when querying large devices.
NOTE:
To configure the maximum number of interfaces per page, enter the Settings --> Visual --> Rows Per Page (For New Graphs Screen) Section and configure it accordingly to your likes.

INSTALL:
To install download the attachement, there 2 files included the graphs_new.php replacement, and the include/config_settings.php Just unzip and copy them to the according directories and you should be ok.
Attachments
The graphs_new page presentation after the modifications done.
The graphs_new page presentation after the modifications done.
graphs_new.gif (29.76 KiB) Viewed 6962 times
The graphs_new configuration screen.
The graphs_new configuration screen.
graphs_new_configure.gif (11.3 KiB) Viewed 6962 times
cacti-graphs_new_fix.zip
(14.06 KiB) Downloaded 576 times
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Post by pestilence »

TODO:
- Implement a cactid like poller for the re-poll functions of cacti, this would allow rapid re-polling instead of the timely php re-poll function.

If anyone is interested (and rather quick in writting C code, then drop a reply...).
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Pestilence,

This patch needs some real work. To test, set your num_row... to 1 and see what happens with a situation where your have 2 data queries with more than just a few items. I used interfaces and disk partitions and it was way not happy. See if you can touch it up and then we can review again.

However, I would rather see a drop down with each of the data queries in the drop down and then if you select the interfaces dropdown item for example, you get xx pages. If you could make that happen instead, it would be much preferred.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests