Advanced export options
Moderators: Developers, Moderators
Advanced export options
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)
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
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.
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 467 times
-
- Cacti User
- Posts: 68
- Joined: Tue Apr 22, 2003 5:51 am
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.
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.
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
-Ian
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
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.
... and the screenshots.
My appologies for the width of the images (and thus for the page display).
My appologies for the width of the images (and thus for the page display).
- Attachments
-
- Export paths and FTP options
- cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png (61.32 KiB) Viewed 13171 times
-
- Extra logging options
- cacti-0.8.5a-adv.exp-0.3 - extra logging options.png (49.36 KiB) Viewed 13171 times
-
- Main export tab
- cacti-0.8.5a-adv.exp-0.3 - main export tab.png (59.44 KiB) Viewed 13172 times
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.
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.
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
Guess that wont happen.. but it would be neat
No FTP export working, fix for Gentoo maybe others too.
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.
$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.
Who is online
Users browsing this forum: No registered users and 0 guests