[SOLVED] Batch modify multiple interface maximums

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

Moderators: Developers, Moderators

Post Reply
fingaz
Posts: 8
Joined: Mon Oct 08, 2012 9:29 am

[SOLVED] Batch modify multiple interface maximums

Post by fingaz »

Hello all!

I'm hoping someone out there can help... I'll try and keep it short and sweet, but informative :)

I'm running Cacti 0.8.7g, within which i have MASSES of networking devices. And i mean masses.
The issue i have is that the interfaces have a maximum value which is quite low; for example from one of the RRDs:

Code: Select all

ds[traffic_in].max = 1.3000000000e+10
ds[traffic_out].max = 1.3000000000e+10
The thing is, i want that to be set to either a large value (40Gbit+), or better yet, Unlimited.

So what i'm trying to do is:
* Run a Database Query to Modify all existing Interface related entries, to change them to Unlimited.
* Run a Database Query to list all of the actual RRD Files, for interfaces which have been modified.
* RRD Tune all of the listed files to match the new setting.

Does anyone have any neat bits of script knocking about that i can borrow (Read: Keep)? :)

Any hints, tips, links or anything will be gratefully received!!

Kind regards,
FingAZ.

SOLUTION:
So, my understanding in a nutshell is that, the actual values are stored ONLY in the RRDs. So when a value higher/lower than the maximum/minimum are fed into the RRD, outside of the configured max/min, the value is disregarded and not graphed. This means that for what i was trying to achieve, all that needed to happen was that the main Data Template needed changing so that all NEW graphs/RRDs were created with this new value, and then to modify the old ones, i used the PHP script found here: http://forums.cacti.net/viewtopic.php?f=5&t=43926
Simples!
Last edited by fingaz on Tue Oct 16, 2012 11:24 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Batch modify multiple interface maximums

Post by gandalf »

I'm quite sure that tehre are scripts around to do so. Sreach for "rrdtool tune" which does what you want.
Or search 1st lik of my sig for the rrd resize script and modify the command created to an rrdtool tune ...
R.
fingaz
Posts: 8
Joined: Mon Oct 08, 2012 9:29 am

Re: Batch modify multiple interface maximums

Post by fingaz »

To be honest, the RRD tuning is the simple bit- What about searching the DB and inserting the values i'm after- any pointers for sample SQL?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Batch modify multiple interface maximums

Post by gandalf »

Concerning the DB, you need only a change of the graph template. Google for "rrdtool tune site:forums.cacti.net" to find any tools
R.
fingaz
Posts: 8
Joined: Mon Oct 08, 2012 9:29 am

Re: Batch modify multiple interface maximums

Post by fingaz »

gandalf wrote:Concerning the DB, you need only a change of the graph template. Google for "rrdtool tune site:forums.cacti.net" to find any tools
R.
I was under the impression that changing the graph template would only change it for newly created graphs? Is that not the case?
Only, considering I've got over 1000 devices with multiple NICs each, manual just isn't an option! :-)
fingaz
Posts: 8
Joined: Mon Oct 08, 2012 9:29 am

Re: Batch modify multiple interface maximums

Post by fingaz »

gandalf wrote:Concerning the DB, you need only a change of the graph template. Google for "rrdtool tune site:forums.cacti.net" to find any tools
R.
My apologies- if I had of done what you suggested first, then I would have noticed that the first two links provide some very useful information for this problem! So, sorry, and thanks :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests