Patch: "Structured RRD Path"

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Reminder:

This patch is only for cacti 0.8.6h !!!

I'm just working on my degree dissertation, so please be patient with me.

If somebody of you needs an upgrade, I'll have to check it with Cacti 0.8.6i at the end of november.

Until then i'll have no time. Sorry :cry:


Best regards
-Andreas-
fconza
Posts: 2
Joined: Wed Feb 14, 2007 5:16 am

Post by fconza »

no update ?

thinks for the work.
User avatar
oxo-oxo
Cacti User
Posts: 126
Joined: Thu Aug 30, 2007 11:35 am
Location: Silkeborg, Denmark
Contact:

Post by oxo-oxo »

Continue, at your displeasure, to SVN thread @ http://forums.cacti.net/viewtopic.php?t=23146
Owen Brotherwood, JN Data A/S, Denmark.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This has been committed to SVN today. Beta was so late, and it was heavily requested at the European conference. I have a little extra juice in the engine and gave it a try.

The approach was different, it works for Windoz, UNIX, and Linux. In addition, you can do everything from the command line:

Code: Select all

cd /var/www/html/cacti/cli
php -q structure_rra_path.php --proceed
The help is pretty self explanitory:

Code: Select all

Structured RRA Paths Utility, Copyright 2008 - The Cacti Group

A simple command line utility that converts a Cacti system from using
legacy RRA paths to using structured RRA paths with the following
naming convention: <path_rra>/host_id/local_data_id.rrd

This utility is designed for very large Cacti systems.

The utility follows the process below:
  1) Disables the Cacti Poller
  2) Checks for a Running Poller.

If it Finds a Running Poller, it will:
  1) Re-enable the Poller
  2) Exit

Else, it will:
  1) Enable Structured Paths in the Console (Settings->Paths)

Then, for Each File, it will:
  1) Create the Structured Path, if Necessary
  2) Copy the File to the Strucured Path Using the New Name
  3) Alter the two Database Tables Required
  4) Remove the Old File

Once all Files are Complete, it will
  1) Re-enable the Cacti Poller

If the utility encounters a problem along the way, it will:
  1) Re-enable the poller
  2) Exit

usage: structure_rra_paths.php --proceed [--help | -H | --version | -V]
The "--proceed" option is required.

Regards,

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?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Hi Larry!

I read your posting and I'm happy to see that this topic makes progress. So I've just taken a look into your code :wink: . From my point of view ( ... and without testing it) I would say that Windows servers could have issues with it at the point where the script checks if the poller is running.
I would expect something like

Code: Select all

shell_exec("wmic process where \"commandline like '%poller.php'\" get threadcount").
Best regards
-Andreas-
Last edited by browniebraun on Mon Oct 13, 2008 9:54 am, edited 1 time in total.
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Andreas,

Please check my commit from just a few minutes ago. I have tested this on Windows and it works flawlessly now (after a few more mods :) )

Larry
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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Oh, sorry, was in too much of a hurry to get out on the road to work. You are correct. I will take a look at that later tonight.

Larry
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?
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

Mmmh ... I would have expected that "shell_exec("ps -ef | grep poller.php | wc -l");" would not work on Windows.
Maybe I'm too tired as a result of the last conference. :D

Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Post by browniebraun »

browniebraun wrote:Mmmh ... I would have expected that "shell_exec("ps -ef | grep poller.php | wc -l");" would not work on Windows.
Maybe I'm too tired as a result of the last conference. :D

Best regards
-Andreas-

I think we both have to work on our timing. :D :D :D
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Jesper
Posts: 45
Joined: Mon Mar 11, 2002 7:00 pm

Structure RRA paths script from 0.8.7c

Post by Jesper »

Hi all,

Does the included structure_rra_paths.php script from Cacti 0.8.7c work on Windows? Thank you,

/Jesper
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yes, but disable your poller while doing it.
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?
gundalba
Posts: 46
Joined: Mon Feb 23, 2009 12:15 pm

Ooops! Cacti does not looks at new structured folder

Post by gundalba »

Just ran the
"php -q structure_rra_paths.php --proceed"
which renamed all my rrd files and moved them to new structured folder.

Though the poller is trying to create new rrd files in the old location and graph display is still pointing there as well.
Thus giving me back the blank graphs...

Help?

Thanks

-- this is what I got on CentOS5 --
Installed Packages
Name : cacti
Arch : noarch
Version: 0.8.7c
Release: 1.el5.rf
:cry:
gundalba
Posts: 46
Joined: Mon Feb 23, 2009 12:15 pm

Post by gundalba »

Ummm.... Anybody???
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you enable first from the Cacti UI? Also, did the script return any errors about the poller cache or other issues? When you ran the script, was the poller cache correct?

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?
gundalba
Posts: 46
Joined: Mon Feb 23, 2009 12:15 pm

Post by gundalba »

TheWitness wrote:Did you enable first from the Cacti UI?
No. I did that after I ran the script.
TheWitness wrote: Also, did the script return any errors about the poller cache or other issues?
Script message went by fast and I did not save the output so I am not too sure. Though I did not notice any messages that looked serious while I was running the script.
TheWitness wrote:When you ran the script, was the poller cache correct?
...
Sorry, no idea. Anyway I can check this now?

Thanks,
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests