Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Advanced export options
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti
Author Message
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Sat Mar 27, 2004 6:19 am    Post subject: Advanced export options Reply with quote

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)



cacti-0.8.5-advanced_export-changed-files.zip
 Description:
Changed files only

Download
 Filename:  cacti-0.8.5-advanced_export-changed-files.zip
 Filesize:  9.18 KB
 Downloaded:  267 Time(s)

Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Sat Mar 27, 2004 6:24 am    Post subject: Reply with quote

And a screen-shot of the new tab architecture.


cacti-advanced-export-webinterface-changes.png
 Description:
 Filesize:  10.39 KB
 Viewed:  5767 Time(s)

cacti-advanced-export-webinterface-changes.png


Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Sat Mar 27, 2004 6:04 pm    Post subject: Reply with quote

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.



cacti-0.8.5-advanced_export-changed-files-0.2.zip
 Description:

Download
 Filename:  cacti-0.8.5-advanced_export-changed-files-0.2.zip
 Filesize:  10.23 KB
 Downloaded:  246 Time(s)

Back to top
Bruno Prigent
Cacti User


Joined: 22 Apr 2003
Posts: 67

PostPosted: Sun Mar 28, 2004 2:41 pm    Post subject: Reply with quote

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.
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Mon Mar 29, 2004 3:02 am    Post subject: Reply with quote

Good Addon

Thanks !
Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Mon Mar 29, 2004 1:37 pm    Post subject: Reply with quote

Started working on ftp export. Hopefully I'll release a version this weekend.
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2235
Location: Carlisle, PA

PostPosted: Sat Apr 03, 2004 3:53 pm    Post subject: Reply with quote

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
Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Sun Apr 04, 2004 7:08 am    Post subject: Reply with quote

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



cacti-0.8.5a-adv.exp-0.3 - patches.zip
 Description:
Pathes against cacti 0.8.5a

Download
 Filename:  cacti-0.8.5a-adv.exp-0.3 - patches.zip
 Filesize:  4.19 KB
 Downloaded:  251 Time(s)


cacti-0.8.5a-adv.exp-0.3 - changed files.zip
 Description:
Changed files

Download
 Filename:  cacti-0.8.5a-adv.exp-0.3 - changed files.zip
 Filesize:  9.37 KB
 Downloaded:  247 Time(s)



Last edited by branix on Sun Apr 04, 2004 7:10 am; edited 1 time in total
Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Sun Apr 04, 2004 7:09 am    Post subject: Reply with quote

... and the screenshots.

My appologies for the width of the images (and thus for the page display).



cacti-0.8.5a-adv.exp-0.3 - extra logging options.png
 Description:
Extra logging options
 Filesize:  49.36 KB
 Viewed:  5644 Time(s)

cacti-0.8.5a-adv.exp-0.3 - extra logging options.png



cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png
 Description:
Export paths and FTP options
 Filesize:  61.32 KB
 Viewed:  5644 Time(s)

cacti-0.8.5a-adv.exp-0.3 - export paths and ftp settings.png



cacti-0.8.5a-adv.exp-0.3 - main export tab.png
 Description:
Main export tab
 Filesize:  59.44 KB
 Viewed:  5645 Time(s)

cacti-0.8.5a-adv.exp-0.3 - main export tab.png


Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Thu May 06, 2004 5:44 pm    Post subject: Reply with quote

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.
Back to top
paddy



Joined: 15 Jul 2004
Posts: 13
Location: Stockholm, Sweden

PostPosted: Mon Aug 02, 2004 8:22 am    Post subject: Reply with quote

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

Back to top
branix



Joined: 14 Mar 2004
Posts: 39

PostPosted: Mon Aug 02, 2004 8:55 am    Post subject: Reply with quote

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.
Back to top
paddy



Joined: 15 Jul 2004
Posts: 13
Location: Stockholm, Sweden

PostPosted: Mon Aug 02, 2004 9:44 am    Post subject: Reply with quote

Sounds great!

Cant wait
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2235
Location: Carlisle, PA

PostPosted: Mon Aug 02, 2004 11:21 pm    Post subject: Reply with quote

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

-Ian
Back to top
helzerr



Joined: 01 Feb 2004
Posts: 40
Location: Orlando, FL

PostPosted: Sun Jan 30, 2005 2:42 pm    Post subject: No FTP export working, fix for Gentoo maybe others too. Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group