Plugin Architecture for Cacti and Monitoring Module

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
wangdrome
Posts: 2
Joined: Fri Oct 07, 2005 7:48 am

can't patch the cacti-0.8.6g

Post by wangdrome »

when I patch the cacti-0.8.6g for instaiing the plugin, It is failed! Any advice? thanks

Redhat AS3.0, Cacti-0.8.6g

[root@vt-mrtg-01 cacti]# patch -p1 -N < cacti-plugin-0.8.6g.diff
patching file data_sources.php
Hunk #1 FAILED at 1038.
1 out of 1 hunk FAILED -- saving rejects to file data_sources.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 394.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file include/config_arrays.php
Hunk #1 FAILED at 19.
Hunk #2 FAILED at 425.
2 out of 2 hunks FAILED -- saving rejects to file include/config_arrays.php.rej
patching file include/config_form.php
Hunk #1 FAILED at 994.
1 out of 1 hunk FAILED -- saving rejects to file include/config_form.php.rej
patching file include/config.php
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 175.
2 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej
patching file include/config_settings.php
Hunk #1 FAILED at 816.
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
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file include/top_header.php.rej
patching file lib/api_device.php
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file lib/api_device.php.rej
patching file lib/functions.php
Hunk #1 FAILED at 181.
Hunk #2 FAILED at 557.
Hunk #3 FAILED at 1347.
3 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 429.
Hunk #2 FAILED at 450.
2 out of 2 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #1 FAILED at 83.
Hunk #2 FAILED at 126.
Hunk #3 FAILED at 427.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 527.
5 out of 5 hunks FAILED -- saving rejects to file lib/html.php.rej
patching file plugins/index.php
patching file poller.php
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 234.
2 out of 2 hunks FAILED -- saving rejects to file poller.php.rej
kslt
Cacti User
Posts: 85
Joined: Tue Aug 02, 2005 4:12 am

Post by kslt »

what file / procedure are putting the data in HOST.STATUS_REC_DATE (the time of last fail) ?
i have to change there the timezone settings.


thanks to all
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

kslt wrote:what file / procedure are putting the data in HOST.STATUS_REC_DATE (the time of last fail) ?
i have to change there the timezone settings.


thanks to all
This is actually stored by Cacti itself, I just pull it out of the database. I am sure that it wouldn't very hard to find though.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Re: can't patch the cacti-0.8.6g

Post by ssams »

wangdrome wrote:when I patch the cacti-0.8.6g for instaiing the plugin, It is failed! Any advice? thanks

Redhat AS3.0, Cacti-0.8.6g

[root@vt-mrtg-01 cacti]# patch -p1 -N < cacti-plugin-0.8.6g.diff
patching file data_sources.php
Hunk #1 FAILED at 1038.
1 out of 1 hunk FAILED -- saving rejects to file data_sources.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 394.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file include/config_arrays.php
Hunk #1 FAILED at 19.
Hunk #2 FAILED at 425.
2 out of 2 hunks FAILED -- saving rejects to file include/config_arrays.php.rej
patching file include/config_form.php
Hunk #1 FAILED at 994.
1 out of 1 hunk FAILED -- saving rejects to file include/config_form.php.rej
patching file include/config.php
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 175.
2 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej
patching file include/config_settings.php
Hunk #1 FAILED at 816.
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
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file include/top_header.php.rej
patching file lib/api_device.php
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file lib/api_device.php.rej
patching file lib/functions.php
Hunk #1 FAILED at 181.
Hunk #2 FAILED at 557.
Hunk #3 FAILED at 1347.
3 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 429.
Hunk #2 FAILED at 450.
2 out of 2 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #1 FAILED at 83.
Hunk #2 FAILED at 126.
Hunk #3 FAILED at 427.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 527.
5 out of 5 hunks FAILED -- saving rejects to file lib/html.php.rej
patching file plugins/index.php
patching file poller.php
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 234.
2 out of 2 hunks FAILED -- saving rejects to file poller.php.rej
i am getting similar errors. i have tried three times now. any ideas?
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: can't patch the cacti-0.8.6g

Post by cigamit »

ssams wrote:
wangdrome wrote:when I patch the cacti-0.8.6g for instaiing the plugin, It is failed! Any advice? thanks

Redhat AS3.0, Cacti-0.8.6g

[root@vt-mrtg-01 cacti]# patch -p1 -N < cacti-plugin-0.8.6g.diff
patching file data_sources.php
Hunk #1 FAILED at 1038.
1 out of 1 hunk FAILED -- saving rejects to file data_sources.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 394.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file include/config_arrays.php
Hunk #1 FAILED at 19.
Hunk #2 FAILED at 425.
2 out of 2 hunks FAILED -- saving rejects to file include/config_arrays.php.rej
patching file include/config_form.php
Hunk #1 FAILED at 994.
1 out of 1 hunk FAILED -- saving rejects to file include/config_form.php.rej
patching file include/config.php
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 175.
2 out of 2 hunks FAILED -- saving rejects to file include/config.php.rej
patching file include/config_settings.php
Hunk #1 FAILED at 816.
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
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file include/top_header.php.rej
patching file lib/api_device.php
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file lib/api_device.php.rej
patching file lib/functions.php
Hunk #1 FAILED at 181.
Hunk #2 FAILED at 557.
Hunk #3 FAILED at 1347.
3 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 429.
Hunk #2 FAILED at 450.
2 out of 2 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #1 FAILED at 83.
Hunk #2 FAILED at 126.
Hunk #3 FAILED at 427.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 527.
5 out of 5 hunks FAILED -- saving rejects to file lib/html.php.rej
patching file plugins/index.php
patching file poller.php
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 234.
2 out of 2 hunks FAILED -- saving rejects to file poller.php.rej
i am getting similar errors. i have tried three times now. any ideas?
Was your Cacti installation a RPM install, or from source?

My only real suggestion is to use the provided files instead of the patch. Be sure to re-setup your config.php afterwards.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

mine was source files. mandrake linux. g of cacti.

i am not sure what you mean by the "provided files". dont i need the patch to run monitor and thold? i had these running (or monitor) on my system but upgraded to g from c and it went away.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

ssams wrote:mine was source files. mandrake linux. g of cacti.

i am not sure what you mean by the "provided files". dont i need the patch to run monitor and thold? i had these running (or monitor) on my system but upgraded to g from c and it went away.
In the archive that was downloaded, I also include the already patched files. You should see a directory called "files-0.8.6g". Use those files to override the originals and them modify your config.php (the one has a few extra items).

Everything "should" work from that point, but if not, we can find out what is happening and fix it.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

ok now i see. i thought those were patch files. i did that and got further. now here is what i get



Image
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

fixed image

almost all links do NOT work.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

yea.. :(

i was hopin he would have that fix for me too. i dont want to restore again today...
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

ssams wrote:ok now i see. i thought those were patch files. i did that and got further. now here is what i get
Open your config.php and setup this option
$config['url_path'] = '/';

For instance, if you can access your Cacti by doing to http://127.0.0.1/ then you would change it to
$config['url_path'] = '/';
or if access it like this http://127.0.0.1/cacti/ then change it to
$config['url_path'] = '/cacti/';

That should fix that issue. I do promise to have the install documents on the plugin architecture finished fairly shortly.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

cigamit wrote:
ssams wrote:ok now i see. i thought those were patch files. i did that and got further. now here is what i get
Open your config.php and setup this option
$config['url_path'] = '/';

For instance, if you can access your Cacti by doing to http://127.0.0.1/ then you would change it to
$config['url_path'] = '/';
or if access it like this http://127.0.0.1/cacti/ then change it to
$config['url_path'] = '/cacti/';

That should fix that issue. I do promise to have the install documents on the plugin architecture finished fairly shortly.
Thanks Cig! that did it.

Appreciate your help and your contributions here.
simonuk1
Posts: 23
Joined: Mon Aug 15, 2005 2:39 pm

Calendar

Post by simonuk1 »

Is there anyway to put in a reporting calendar, so that alerts are only sent at certain times.

I know there is a weekend excpetion, but is there anyway of putting in anything in the code to state time periods when alerts can be disabled on a per datasource setting.

Great job with the Thold plugin.

Keep up the good work.

Cheers

Si
xphu
Posts: 12
Joined: Thu Jun 30, 2005 7:31 am
Location: Helsinki, Finland

Scheduler

Post by xphu »

Please find the answer from the following link.

http://cactiusers.org/forums/viewtopic.php?t=86

...\xphu
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Calendar

Post by cigamit »

simonuk1 wrote:Is there anyway to put in a reporting calendar, so that alerts are only sent at certain times.

I know there is a weekend excpetion, but is there anyway of putting in anything in the code to state time periods when alerts can be disabled on a per datasource setting.

Great job with the Thold plugin.

Keep up the good work.

Cheers

Si
The future schema I am tossing about will include a much more robust scheduler and alerter.

The users that you create for Cacti will have emails, SMS numbers, IM usernames, ect... added into their "accounts". They can then specify what method they perfer to get alerted on at what time. So for instance, when I am in the office from 8am - 5am, then email me. From 5pm - 9pm SMS message my phone, and the rest of the time use my pager.

This way, instead of having to input an email address or SMS number into each and every Threshold, you just assign a user as a Technician to that threshold (or possibly device, and have the device settings set globally over all of the devices thresholds). Another perk, is that this way, if the users email address changes, you change it once, instead of 1000 times.

I also plan to add in a "rotation" option, which will allow you to specify which users to alert at which time frames (we have 4 x 8 hour shifts in our data center, so its better to alert the guys that are here). This will also do what you are requesting above, you will only set it to alert during the hours you want, and the rest of the rotation is blank, so no alerts.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests