Advanced export options

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

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

Advanced export options

#1 Post by branix » Sat Mar 27, 2004 6:19 am

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 616 times

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

#2 Post by branix » Sat Mar 27, 2004 6:24 am

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 12210 times

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

#3 Post by branix » Sat Mar 27, 2004 6:04 pm

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 421 times

Bruno Prigent
Cacti User
Posts: 67
Joined: Tue Apr 22, 2003 5:51 am

#4 Post by Bruno Prigent » Sun Mar 28, 2004 2:41 pm

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: 256
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

#5 Post by Pumpi » Mon Mar 29, 2004 3:02 am

Good Addon :D

Thanks !

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

#6 Post by branix » Mon Mar 29, 2004 1:37 pm

Started working on ftp export. Hopefully I'll release a version this weekend.

raX
Lead Developer
Posts: 2237
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

#7 Post by raX » Sat Apr 03, 2004 3:53 pm

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

#8 Post by branix » Sun Apr 04, 2004 7:08 am

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 401 times
cacti-0.8.5a-adv.exp-0.3 - patches.zip
Pathes against cacti 0.8.5a
(4.19 KiB) Downloaded 428 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

#9 Post by branix » Sun Apr 04, 2004 7:09 am

... and the screenshots.

My appologies for the width of the images (and thus for the page display).
Attachments
cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png
Export paths and FTP options
cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png (61.32 KiB) Viewed 12087 times
cacti-0.8.5a-adv.exp-0.3 - extra logging options.png
Extra logging options
cacti-0.8.5a-adv.exp-0.3 - extra logging options.png (49.36 KiB) Viewed 12087 times
cacti-0.8.5a-adv.exp-0.3 - main export tab.png
Main export tab
cacti-0.8.5a-adv.exp-0.3 - main export tab.png (59.44 KiB) Viewed 12088 times

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

#10 Post by branix » Thu May 06, 2004 5:44 pm

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

#11 Post by paddy » Mon Aug 02, 2004 8:22 am

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

#12 Post by branix » Mon Aug 02, 2004 8:55 am

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

#13 Post by paddy » Mon Aug 02, 2004 9:44 am

Sounds great! :)

Cant wait ;)

raX
Lead Developer
Posts: 2237
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

#14 Post by raX » Mon Aug 02, 2004 11:21 pm

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.

#15 Post by helzerr » Sun Jan 30, 2005 2:42 pm

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