Advanced export options

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Advanced export options

Post by branix »

I have modified the original cacti 0.8.5, to add more fuctionality to the exporting process. The patched files are atached to this post.

After replacing the files in your 0.8.5 install path, you get the following changes in the web interface: Cacti Settings has now a new tab (called "Export") where you can choose when to export the graphs. Options are:

a) Disable - there will be no graph export
b) Classic - export every x times - the default in cacti 0.8.5
c) Hourly at specified minutes - every hour at xx minutes past the hour (eg: 35)
d) Daily at specified time - every day at time (eg: 23:55)
Attachments
cacti-0.8.5-advanced_export-changed-files.zip
Changed files only
(9.18 KiB) Downloaded 667 times
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

And a screen-shot of the new tab architecture.
Attachments
cacti-advanced-export-webinterface-changes.png
cacti-advanced-export-webinterface-changes.png (10.39 KiB) Viewed 13298 times
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

There are a few fixes to be done. Attached file is v0.2.
Added an extra script (trimmed-down cmd.php) that does only graph export.
Attachments
cacti-0.8.5-advanced_export-changed-files-0.2.zip
(10.23 KiB) Downloaded 468 times
Bruno Prigent
Cacti User
Posts: 68
Joined: Tue Apr 22, 2003 5:51 am

Post by Bruno Prigent »

Could you had a features that allow to export to a FTP server with those parameters ?
FTP Host (ftp.test.com)
FTP Port (21)
FTP Path (/the/path/to/the/directory)
FTP Username (ftpuser)
FTP Password (ftppassword)

So administrators can provide a static web access to users http://web.test.com/the/path/to/the/directory)

Since the use of FTP need a special compilation of PHP for linux (with the option --enable-ftp), it will be usefull to use ncftpput. In windows the php support for ftp is enabled by default.
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

Good Addon :D

Thanks !
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

Started working on ftp export. Hopefully I'll release a version this weekend.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Since a) this is a cool addon and b) branix is nice enough to code this, I will include this in version 0.8.6. Let me know when the code is in a state that would be good for inclusion. I will at least wait for you to work on the FTP support mentioned above. If you could provide the patch/changes against 0.8.5a, that would be great. If not, it is not a huge deal since there weren't that many changes between 0.8.5 and 0.8.5a.

-Ian
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

I'm up with a new release of my advanced export patch, this time with ftp support.

There are 2 ftp export methods:
- using the PHP built-in ftp functions;
- using ncftpput (as suggested in a previus post).

There is an option to delete all files in the remote directory (Sanitize remote directory), that are only in use when using the 1st ftp method.

All changed files are derived from cacti 0.8.5a, so when installing my patch use it against cacti 0.8.5a.

I have attached the changed files, the patch against cacti 0.8.5a and three screenshots.

Ftp upload was tested with Serv-U ftp server (running on Windows), but it should work fine with any other servers as well.

There is an extra option, in the Cacti settings -> General, to do logging of ftp uploads.

Currently I'm having a little trouble with blocky thumbnails, but I don't think this is due to my patching against cacti, as I didn't modify the raw export method.

Vlad
Attachments
cacti-0.8.5a-adv.exp-0.3 - changed files.zip
Changed files
(9.37 KiB) Downloaded 464 times
cacti-0.8.5a-adv.exp-0.3 - patches.zip
Pathes against cacti 0.8.5a
(4.19 KiB) Downloaded 477 times
Last edited by branix on Sun Apr 04, 2004 7:10 am, edited 1 time in total.
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

... and the screenshots.

My appologies for the width of the images (and thus for the page display).
Attachments
Export paths and FTP options
Export paths and FTP options
cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png (61.32 KiB) Viewed 13175 times
Extra logging options
Extra logging options
cacti-0.8.5a-adv.exp-0.3 - extra logging options.png (49.36 KiB) Viewed 13175 times
Main export tab
Main export tab
cacti-0.8.5a-adv.exp-0.3 - main export tab.png (59.44 KiB) Viewed 13176 times
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

As I wanted to make some order among my projects I have built a website with info about my patch against cacti 0.8.5a.

You can find all the info in the above posts at the following location:
http://www.osmcluj.ro/~branix/cactiAE/

Feature requests and contact form are also provided.
paddy
Posts: 14
Joined: Thu Jul 15, 2004 9:34 am
Location: Stockholm, Sweden

Post by paddy »

This looks like a great addon. Another functionallity that would be great, altho I know alot of ppl will yell and scream at me for this, is email.. yes I know.. dont email files.. but it would be great.. and if in turn it was possible to mail specific grapths or parts of the graph tree to specified email adresses.. now that'd be neat ;)

Guess that wont happen.. but it would be neat :)

:roll:
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

Actually I have implemented such a system (graphs by email) for my network - they are very usefull when in a remote location.

I'll definitely implement that in my next release.
paddy
Posts: 14
Joined: Thu Jul 15, 2004 9:34 am
Location: Stockholm, Sweden

Post by paddy »

Sounds great! :)

Cant wait ;)
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This patch has been incorporated into the CVS tree and will be included in the 0.8.6 release of Cacti.

-Ian
helzerr
Cacti User
Posts: 54
Joined: Sun Feb 01, 2004 3:10 am
Location: Orlando, FL
Contact:

No FTP export working, fix for Gentoo maybe others too.

Post by helzerr »

Enhanced graph export script breakes due to no TMP enviroment variable set on Gentoo linux (maybe others too?). cacti/lib/Graph_Export.php lines 76 and 85:

$stExportDir = $_ENV["TMP"].'/cacti-ftp-temp';

I had to change to:

$stExportDir = '/tmp/cacti-ftp-temp';

Alternatively, it may have been possible to add TMP=/tmp to /etc/crontab.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest