Patch: "Structured RRD Path"
Moderators: Developers, Moderators
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
- oxo-oxo
- Cacti User
- Posts: 126
- Joined: Thu Aug 30, 2007 11:35 am
- Location: Silkeborg, Denmark
- Contact:
Continue, at your displeasure, to SVN thread @ http://forums.cacti.net/viewtopic.php?t=23146
Owen Brotherwood, JN Data A/S, Denmark.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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:
The help is pretty self explanitory:
The "--proceed" option is required.
Regards,
TheWitness
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
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]
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?
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?
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
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 . 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
Best regards
-Andreas-
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 . 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").
-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
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
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.
Best regards
-Andreas-
Maybe I'm too tired as a result of the last conference.
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
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
- browniebraun
- Developer
- Posts: 791
- Joined: Tue Jun 13, 2006 1:17 am
- Location: Cologne, Germany
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.
Best regards
-Andreas-
I think we both have to work on our timing.
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
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Structure RRA paths script from 0.8.7c
Hi all,
Does the included structure_rra_paths.php script from Cacti 0.8.7c work on Windows? Thank you,
/Jesper
Does the included structure_rra_paths.php script from Cacti 0.8.7c work on Windows? Thank you,
/Jesper
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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?
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?
Ooops! Cacti does not looks at new structured folder
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
"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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
No. I did that after I ran the script.TheWitness wrote:Did you enable first from the Cacti UI?
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: Also, did the script return any errors about the poller cache or other issues?
Sorry, no idea. Anyway I can check this now?TheWitness wrote:When you ran the script, was the poller cache correct?
...
Thanks,
Who is online
Users browsing this forum: No registered users and 0 guests