Advance graph export add-on

Support questions about the Threshold plugin

Moderators: Developers, Moderators

jaybob
Posts: 12
Joined: Mon Aug 08, 2005 5:14 am
Location: france - toulouse
Contact:

Advance graph export add-on

Post by jaybob »

Hello,

I want to present an add-on that I developed on Cacti-0.8.6f. Actually, I needed an advance export graph format. The patch that I propose uses the Cacti graph tree.

In the cacti_export_path, for each tree, a directory is made. For each branch, there is a new html file generated. And on the left, the tree is showed, with the javaScript used in Cacti. Only graphs that are enable to export attached on the Cacti graph tree will be really exported.

The tar archive contains a diff file which will modify include/config_settings.php and lib/graph_export.php. You also have to
copy a javascript file, ftiens4_export.js. It's the copy of ftiens4.js with the ICONPATH changed. That's all.

All your coments are welcomed.
Thanks,
jerome
Attachments
Settings for this add-on
Settings for this add-on
patch_settings.jpg (147.52 KiB) Viewed 22061 times
tree_export_patch.tar
the files
(70 KiB) Downloaded 778 times
Exported html files with the add-on "tree presentation"
Exported html files with the add-on "tree presentation"
patch_result.jpg (145.55 KiB) Viewed 22061 times
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

jaybob,

good idea and implementation. It's running without any problems.


Thanks !

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

Post by TheWitness »

Hug's and kisses from Warren Michigan. Will look to rollout with credit due.

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?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Great job... this is a very well written modification. The only (very minor) thing that I would do is check if a file (such as include/treeview/ftiens4_export.js) exists before copying all of the header files in place each time the poller runs. It looks like there is a possiblity of including this into 0.8.6g :-D.

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

Post by TheWitness »

Ian,

It is committed for your review. All modified for the new export statistics.

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?
jaybob
Posts: 12
Joined: Mon Aug 08, 2005 5:14 am
Location: france - toulouse
Contact:

Post by jaybob »

Thanks for your tests and your comments ,

My work is totaly free and open. You can use it as you want :wink:
It would be great if this add-on could be integrated to the next release of Cacti :)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Jaybob,

It was so well written, it was added to the 0.8.6g SVN yesterday.

Merci!!

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?
jaybob
Posts: 12
Joined: Mon Aug 08, 2005 5:14 am
Location: france - toulouse
Contact:

Post by jaybob »

First, many thanks for your replies. You have encouraged me to continue

Here is a second version of this patch. I add another way to customize HTML generated files.
Now, you can chose between "classical presentation" and "tree presentation", and you also could change the html-header and html-footer.
With this add-on, html exported files could be more personalized.

Feel free to integrate it in the next release of Cacti, if you want of course.
Attachments
settings screen
settings screen
settings.PNG (17.49 KiB) Viewed 21648 times
export_presentation.tar
files
(70 KiB) Downloaded 655 times
aijii
Posts: 4
Joined: Tue Sep 06, 2005 12:52 am

Post by aijii »

I couldn't get this to work. It kills my console settings window, and the graphs section tree view mode don't work no more. Even after I restore the old php's it stil doesn't seem to work!
jaybob
Posts: 12
Joined: Mon Aug 08, 2005 5:14 am
Location: france - toulouse
Contact:

Post by jaybob »

What is your Cacti version ?
I made this with Cacti-0.8.6f
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please wait on 0.8.6. It should be released this week. It will include this most excellent contribution.

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
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi Larry

I've checked out 0.8.6g from SVN, did a fresh install, but I don't find how to use the "selective preview mode". Is there anything special to do ?

Thanks in advance.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
aijii
Posts: 4
Joined: Tue Sep 06, 2005 12:52 am

Post by aijii »

jaybob wrote:What is your Cacti version ?
I made this with Cacti-0.8.6f
Hi,

Okay so I updated to 0.8.6f just to be sure. I got it working again. Then I tried both of the patches in this thread. Neither worked. And after recopying the .save files over the originals, the settings page is still empty, except for a heading and cancel and save buttons.

The tree view works however. I think i borked it in other ways the first time i tried this. Its really annoying, coz this is an awesome feature thats perfect for what we need.

Cheers for the contribution anyway mate.

Adrian
jaybob
Posts: 12
Joined: Mon Aug 08, 2005 5:14 am
Location: france - toulouse
Contact:

Post by jaybob »

Sorry, I had not given enough information when I posted the second patch. :oops:

You only have to patch your Cacti 0.8.6f with the second patch (if you want the 2 features) or with the first patch (if you only want the tree presentation feature).

But patching with the two files doesn't work. You have to choose.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

0.8.6g has been released.

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 7 guests