|
It is currently Sat Feb 04, 2012 2:43 am
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 15 posts ] |
|
| Author |
Message |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
 Cacti 0.8.6h
Are the Plugin Architecture and the Plugins working with the newly released Cacti 0.8.6h ? (see http://www.cacti.net/release_notes_0_8_6h.php)
Any adaptations needed ?
|
| Wed Jan 04, 2006 2:34 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
 Re: Cacti 0.8.6h
The Plugin Architecture was working perfectly with v0.8.6h beta 4, and there haven't been any changes that would affect it in any way, so Yes it should be working. The patch and include files for v0.8.6h are in the download, so just re-grab it!
|
| Wed Jan 04, 2006 3:04 am |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Unfortunately, applying the patch to a fresh installed Cacti 0.8.6h did result in some errors:
Code: /srv/www/htdocs/cacti-0.8.6h # patch -p1 -N < cacti-plugin-0.8.6h.diff patching file data_sources.php patching file graphs_new.php patching file include/config_arrays.php patching file include/config_form.php patching file include/config.php Hunk #2 succeeded at 61 (offset 5 lines). Hunk #3 succeeded at 74 (offset 5 lines). patching file include/config_settings.php Hunk #1 FAILED at 844. 1 out of 1 hunk FAILED -- saving rejects to file include/config_settings.php.rej patching file include/plugins.php patching file include/top_graph_header.php patching file include/top_header.php patching file lib/api_device.php patching file lib/functions.php patching file lib/html_form.php patching file lib/html.php patching file plugins/index.php patching file poller.php Hunk #2 FAILED at 266. 1 out of 2 hunks FAILED -- saving rejects to file poller.php.rej
Content of include/config_settings.php.rej Code: *************** *** 844,850 **** "method" => "textbox", "max_length" => "100" ) ) ); ?>--- 844,852 ---- "method" => "textbox", "max_length" => "100" ) ) ); + do_hook("config_settings"); + ?>
Content of poller.php.rej Code: *************** *** 264,271 **** chdir(read_config_option("path_webroot")); } }else{ print "There are no items in your poller cache or polling is disabled. Make sure you have at least one data source created. If you do, go to 'Utilities', and select 'Clear Poller Cache'.\n"; } // End Mainline Processing ?>--- 266,274 ---- chdir(read_config_option("path_webroot")); } }else{ print "There are no items in your poller cache or polling is disabled. Make sure you have at least one data source created. If you do, go to 'Utilities', and select 'Clear Poller Cache'.\n"; } // End Mainline Processing + do_hook("poller_bottom"); ?>
Any idea what has to be done to apply the patch successfully ?
|
| Wed Jan 04, 2006 3:34 am |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Hm, after manually adding the two missing lines to the files, I had huge problems with Cacti. All links in Cacti are now absolute with e.g. href=/include/.... instead of href=include/....
Seems to be a bug there in the Plugin Architecture.
|
| Wed Jan 04, 2006 6:19 am |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Okay, the error with the wrong paths was my fault. I did not change the url_path.
However, the patch errors still occur. I also found some lines in config.php of the original Cacti source that are not in the config.php of the patch.
|
| Wed Jan 04, 2006 7:21 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
I have updated the plugin architecture using the released version of v0.8.6h and everything seems to work fine for me now. Let me know if anyone has anymore issues with it.
|
| Wed Jan 04, 2006 5:24 pm |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Thanks, the new patch is better, but I have still an issue with patching the config.php. Maybe it's because I don't have the default MySQL password set in my original config.php file ?
As far as I understand, the patch needs correct settings prior to applying it in order to fetch data from the database, isn't it.
Code: ... patching file include/config.php Hunk #1 FAILED at 27. 1 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej patching file include/config_settings.php ...
Code: *************** *** 27,42 **** /* make sure these values refect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactiuser"; $database_port = "3306";
/* ----- you probably do not need to change anything below this line ----- */
/* Files that do not need http header information - Command line scripts */ $no_http_header_files = array( "poller.php", "cmd.php", "query_host_cpu.php", "query_host_partitions.php", --- 27,55 ---- /* make sure these values refect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactiuser"; $database_port = "3306";
+ $plugins = array(); + //$plugins[] = 'thold'; + + /* Do not edit this line */ + $config = array(); + + /* This is full URL Path to the Cacti installation + For example, if your cacti was accessible by http://server/cacti/ you would user '/cacti/' + as the url path. For just http://server/ use '/' + */ + + $config["url_path"] = '/'; + /* ----- you probably do not need to change anything below this line ----- */
/* Files that do not need http header information - Command line scripts */ $no_http_header_files = array( "poller.php", "cmd.php", "query_host_cpu.php", "query_host_partitions.php",
|
| Thu Jan 05, 2006 5:01 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
ralfk wrote: Thanks, the new patch is better, but I have still an issue with patching the config.php. Maybe it's because I don't have the default MySQL password set in my original config.php file ?
As far as I understand, the patch needs correct settings prior to applying it in order to fetch data from the database, isn't it.
Yes, you have to patch it before you change anything in the config.php or it has a good chance of failing. I was hoping the new socket line would give it a good reference point, but it doesn't.
|
| Thu Jan 05, 2006 9:30 am |
|
 |
|
kramsay
New User
Joined: Thu Jan 05, 2006 4:56 pm Posts: 9
|
 patch files 0.8.6h include dir
Jimmy
Keep up the great work. I have upgraded to 0.8.6.h and now want to load some plug-ins to set up mail alerting.
After downloading and extracting the architecture files , and descending into the files-0.8.6h directory , there is a directory called " includes" - should that not be named " include "?
I am having a bit of trouble installing the arch on my cacti 0.8.6h. Neither method seems to work for me . I've tried both ways - overwriting the files/directories ( and changing the name of the includes dir ) or using the " patch -p1 ....." method.
The overwrite files method stops cacti working ( yes I made the simple changes to config.php as per instructions). Pointing the browser to Cacti misses out the login screen and jumps to the next screen - but no writing appears in the body !
The patch method with the --dry-run option generates the following number of errors
Quote: patching file data_sources.php patching file graphs_new.php patching file include/config_arrays.php patching file include/config_form.php patching file include/config.php Hunk #1 FAILED at 29. Hunk #2 succeeded at 61 (offset 5 lines). 1 out of 3 hunks FAILED -- saving rejects to file include/config.php.rej patching file include/config_settings.php Hunk #1 FAILED at 844. 1 out of 1 hunk FAILED -- saving rejects to file include/config_settings.php.rej patching file include/plugins.php patching file include/top_graph_header.php patching file include/top_header.php patching file lib/api_device.php patching file lib/functions.php patching file lib/html_form.php patching file lib/html.php The next patch would create the file plugins/index.php, which already exists! Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file plugins/index.php.rej patching file poller.php Hunk #2 FAILED at 266. 1 out of 2 hunks FAILED -- saving rejects to file poller.php.rej
Also the .rej files are not created .
Any clues ??
|
| Thu Jan 05, 2006 6:15 pm |
|
 |
|
kramsay
New User
Joined: Thu Jan 05, 2006 4:56 pm Posts: 9
|
 Update on architecture patch patching
Jimmy
I may have been using an old version ( Dec 22nd) of the architecture. I downloaded it again andl get a (different) error when running the patch utility. Unfortunately the config.php.rej file is still not being created so its a bit tricky investigating it further.
Quote: patching file data_sources.php patching file graphs_new.php patching file include/config_arrays.php patching file include/config_form.php patching file include/config.php Hunk #1 FAILED at 27. 1 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej patching file include/config_settings.php patching file include/plugins.php patching file include/top_graph_header.php patching file include/top_header.php patching file lib/api_device.php patching file lib/functions.php patching file lib/html_form.php patching file lib/html.php The next patch would create the file plugins/index.php, which already exists! Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file plugins/index.php.rej patching file poller.php
|
| Thu Jan 05, 2006 6:34 pm |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
 Re: Update on architecture patch patching
kramsay wrote: Jimmy I may have been using an old version ( Dec 22nd) of the architecture. I downloaded it again andl get a (different) error when running the patch utility. Unfortunately the config.php.rej file is still not being created so its a bit tricky investigating it further. Quote: patching file data_sources.php patching file graphs_new.php patching file include/config_arrays.php patching file include/config_form.php patching file include/config.php Hunk #1 FAILED at 27. 1 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej patching file include/config_settings.php patching file include/plugins.php patching file include/top_graph_header.php patching file include/top_header.php patching file lib/api_device.php patching file lib/functions.php patching file lib/html_form.php patching file lib/html.php The next patch would create the file plugins/index.php, which already exists! Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file plugins/index.php.rej patching file poller.php
Have you already modified the config.php (like to change the password?) or are you using the exact one that came with Cacti v0.8.6h? The patch will not work if you modify anything in the config.php file before installing the patch. If plugins/index.php already exists, then it shouldn't be an issue.
|
| Thu Jan 05, 2006 7:28 pm |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Quote: The patch will not work if you modify anything in the config.php file before installing the patch.
Jimmy, but then I have to set the default password in my MySQL database, right ? If my real database password isn't the default and I have set the default in config.php, then the patch process will fail updating the files correctly, because it can't get data from the database. This was my experience. Right ?
So, that would mean:
Set the default password in config.php and set it in the database, too. Then, after patching, reset both to your customized value.
|
| Fri Jan 06, 2006 2:12 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
ralfk wrote: Quote: The patch will not work if you modify anything in the config.php file before installing the patch. Jimmy, but then I have to set the default password in my MySQL database, right ? If my real database password isn't the default and I have set the default in config.php, then the patch process will fail updating the files correctly, because it can't get data from the database. This was my experience. Right ? So, that would mean: Set the default password in config.php and set it in the database, too. Then, after patching, reset both to your customized value.
It is not necessary to change your MySQL password in the database, it takes less than 30 seconds to edit the config.php file and put in the default password, and then run the patch command. Once the patching is done, just re-edit the file to use the correct password. The patch process does not require MySQL access, so that will not fail because the password is wrong. Your Cacti will be not be able to connect to the database for roughly 30 seconds, but you can't expect 100% uptime when are updating your Cacti files anyways.
|
| Fri Jan 06, 2006 2:24 am |
|
 |
|
ralfk
User
Joined: Wed Jan 04, 2006 2:17 am Posts: 28
|
Oops, I thought I had some troubles after patching with passwords not matching. Maybe this was my fault during my first approaches patching Cacti 0.8.6h. If you say, that the database isn't used for patching, then forgive me.
Please keep working on the plugin architecture. It's great ! I have already written three simple plugins for my very special purposes in my network.
Thanks
Ralf
|
| Fri Jan 06, 2006 2:35 am |
|
 |
|
kramsay
New User
Joined: Thu Jan 05, 2006 4:56 pm Posts: 9
|
 Patching process
OK Jimmy , I have it working now. I guess both me and Ralfk had similar issues
In hindsight your installation instructions are correct and I was trying to patch a working system that of course had a modified config.php.
OK now to figure out the next stage of getting the threshold alerts to send an e-mail.
Great job - your work is much appreciated.
|
| Fri Jan 06, 2006 12:20 pm |
|
|
|
Page 1 of 1
|
[ 15 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|