Notices 0.1

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Author
Message
megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#46 Post by megatron_007 » Mon Sep 07, 2009 10:52 am

Can you give me some more hints on how to activate it?

megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#47 Post by megatron_007 » Mon Sep 07, 2009 12:56 pm

I've installed the CPA by copying the folder files-0.8.7d to cacti directory and let it to overwrite the necessary files. I then got the correct /include/global.php file and added in the plugin. Trying the notices box gives me "No Access".

While in this state, I found no problem with my cacti's performance. Just making plugins to work I'm having problem with.

I tried the dry run for patch to see if there's any error and here's what I got:
# patch -p1 -N --dry-run < cacti-plugin-0.8.7d-PA-v2.4.diff
patching file auth_changepassword.php
Hunk #1 FAILED at 59.
1 out of 1 hunk FAILED -- saving rejects to file auth_changepassword.php.rej
patching file auth_login.php
Hunk #1 FAILED at 212.
Hunk #2 FAILED at 264.
Hunk #3 FAILED at 327.
3 out of 3 hunks FAILED -- saving rejects to file auth_login.php.rej
patching file data_sources.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 404.
Hunk #3 FAILED at 538.
Hunk #4 FAILED at 685.
Hunk #5 FAILED at 979.
Hunk #6 FAILED at 1313.
Hunk #7 FAILED at 1342.
7 out of 7 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
Hunk #1 FAILED at 44.
1 out of 1 hunk FAILED -- saving rejects to file graph_image.php.rej
patching file graph.php
Hunk #1 FAILED at 98.
Hunk #2 FAILED at 213.
Hunk #3 FAILED at 246.
3 out of 3 hunks FAILED -- saving rejects to file graph.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 479.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file graphs.php
Hunk #1 FAILED at 45.
Hunk #2 FAILED at 362.
Hunk #3 FAILED at 506.
3 out of 3 hunks FAILED -- saving rejects to file graphs.php.rej
patching file host.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 311.
Hunk #3 FAILED at 449.
Hunk #4 FAILED at 542.
Hunk #5 FAILED at 654.
Hunk #6 FAILED at 1116.
6 out of 6 hunks FAILED -- saving rejects to file host.php.rej
patching file include/auth.php
Hunk #1 FAILED at 31.
Hunk #2 FAILED at 78.
Hunk #3 FAILED at 86.
Hunk #4 FAILED at 94.
4 out of 4 hunks FAILED -- saving rejects to file include/auth.php.rej
patching file include/bottom_footer.php
Hunk #1 FAILED at 21.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED -- saving rejects to file include/bottom_footer.php.rej
patching file include/global_arrays.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 642.
2 out of 2 hunks FAILED -- saving rejects to file include/global_arrays.php.rej
patching file include/global_constants.php
Hunk #1 FAILED at 175.
1 out of 1 hunk FAILED -- saving rejects to file include/global_constants.php.rej
patching file include/global_form.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 1185.
2 out of 2 hunks FAILED -- saving rejects to file include/global_form.php.rej
patching file include/global.php
Hunk #1 succeeded at 59 with fuzz 2 (offset 18 lines).
Hunk #2 FAILED at 109.
Hunk #3 FAILED at 212.
Hunk #4 succeeded at 225 with fuzz 2 (offset 6 lines).
2 out of 4 hunks FAILED -- saving rejects to file include/global.php.rej
patching file include/global_settings.php
Hunk #1 FAILED at 1185.
1 out of 1 hunk FAILED -- saving rejects to file include/global_settings.php.rej
The next patch would create the file include/plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file include/plugins.php.rej
patching file include/top_graph_header.php
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 50.
Hunk #3 FAILED at 149.
Hunk #4 FAILED at 161.
Hunk #5 FAILED at 169.
Hunk #6 FAILED at 198.
6 out of 6 hunks FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 79.
Hunk #3 FAILED at 87.
Hunk #4 FAILED at 100.
4 out of 4 hunks FAILED -- saving rejects to file include/top_header.php.rej
patching file index.php
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 48.
2 out of 2 hunks FAILED -- saving rejects to file index.php.rej
patching file lib/api_device.php
Hunk #1 FAILED at 132.
1 out of 1 hunk FAILED -- saving rejects to file lib/api_device.php.rej
patching file lib/auth.php
Hunk #1 FAILED at 122.
Hunk #2 FAILED at 155.
2 out of 2 hunks FAILED -- saving rejects to file lib/auth.php.rej
patching file lib/functions.php
Hunk #1 FAILED at 1640.
Hunk #2 FAILED at 1653.
Hunk #3 FAILED at 1732.
3 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 661.
Hunk #2 FAILED at 678.
Hunk #3 FAILED at 699.
3 out of 3 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #1 FAILED at 86.
Hunk #2 FAILED at 143.
Hunk #3 FAILED at 177.
Hunk #4 FAILED at 263.
Hunk #5 FAILED at 702.
Hunk #6 FAILED at 713.
Hunk #7 FAILED at 742.
Hunk #8 FAILED at 763.
8 out of 8 hunks FAILED -- saving rejects to file lib/html.php.rej
The next patch would create the file lib/plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file lib/plugins.php.rej
patching file lib/poller.php
Hunk #1 FAILED at 324.
1 out of 1 hunk FAILED -- saving rejects to file lib/poller.php.rej
patching file lib/rrd.php
Hunk #1 FAILED at 557.
Hunk #2 FAILED at 1392.
Hunk #3 FAILED at 1407.
3 out of 3 hunks FAILED -- saving rejects to file lib/rrd.php.rej
patching file lib/variables.php
Hunk #1 FAILED at 183.
1 out of 1 hunk FAILED -- saving rejects to file lib/variables.php.rej
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
The next patch would create the file plugins.php,
which already exists! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file plugins.php.rej
patching file poller.php
Hunk #1 FAILED at 73.
Hunk #2 FAILED at 263.
Hunk #3 FAILED at 407.
Hunk #4 FAILED at 458.
4 out of 4 hunks FAILED -- saving rejects to file poller.php.rej
patching file user_admin.php
Hunk #1 FAILED at 72.
Hunk #2 FAILED at 420.
Hunk #3 FAILED at 463.
Hunk #4 FAILED at 915.
Hunk #5 FAILED at 943.
Hunk #6 FAILED at 957.
6 out of 6 hunks FAILED -- saving rejects to file user_admin.php.rej
patching file utilities.php
Hunk #1 FAILED at 129.
Hunk #2 FAILED at 1645.
2 out of 2 hunks FAILED -- saving rejects to file utilities.php.rej

megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#48 Post by megatron_007 » Sat Sep 12, 2009 3:52 pm

after I imported pa.sql to cacti database, and checked in Plugin Management, I do not see "No Access" remark anymore inside the notices box.

But now it's being redirected to "Wrong RRA!" page when I click Save Notices

megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#49 Post by megatron_007 » Sat Sep 12, 2009 4:15 pm

no rra_id created

megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#50 Post by megatron_007 » Sat Sep 12, 2009 4:21 pm

brezel wrote:
Can you add following line in baum.php at line 6? Above the Notices button something like "rra:1 number:1" should appear.

Code:
echo('rra:'.$rra["id"].' number:'.$number);

Here's the result:
Attachments
cactirra.JPG
result
cactirra.JPG (4.63 KiB) Viewed 20649 times

megatron_007
Posts: 22
Joined: Sat Dec 08, 2007 3:54 pm

#51 Post by megatron_007 » Mon Oct 12, 2009 7:19 am

thanks! It's fixed!

tamias
Posts: 49
Joined: Thu Oct 16, 2008 7:12 am

#52 Post by tamias » Sun Nov 15, 2009 11:04 pm

Hello Brezel!
How do I fix it?
______
Cacti Version 0.8.7e
Plugin Architecture 2.5
Poller Type CMD.php
Server Info Darwin 10.2.0
Web Server Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 PHP/5.2.11
PHP Version 5.2.11
MySQL Version 5.1.40-log
RRDTool Version 1.3.8
SNMP Version 5.4.2.1
Plugins Real-time statistics (zond - v0.34c)
Notices (Notices - v0.2c)
Attachments
Screen shot 2009-11-16 at 11.59.38.jpg
Screen shot 2009-11-16 at 11.59.38.jpg (53.86 KiB) Viewed 20200 times
Regards, Michail A.

fish
Posts: 10
Joined: Tue Nov 09, 2004 12:28 am

#53 Post by fish » Fri Dec 04, 2009 11:19 am

so .. how to fix wrong rra ?

got this error
[Fri Dec 4 23:25:47 2009] [error] PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/htdocs/mrtg/plugins/notices/load.php on line 25
[Fri Dec 4 23:25:47 2009] [error] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/htdocs/mrtg/plugins/notices/load.php on line 103
[Fri Dec 4 23:25:47 2009] [error] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/htdocs/mrtg/plugins/notices/load.php on line 112

using 0.8.7e PIA 2.6 notices 0.2c

guigzmorez
Posts: 14
Joined: Mon Dec 03, 2007 12:50 pm

graph/graphview behaviouring differently with notice

#54 Post by guigzmorez » Fri Feb 19, 2010 8:52 am

Hello,

I am running cacti d with notice c, for me :

The N for notice appears with graph_view.php but no RRA numbers associated with the graph => notices not saved and not added to the graph.

The N appears with graph.php RRA numbers appear => notices saved and added to the graph.

Would someone know how to make working Notice with graph_view?

Regards,

Guigzmorez

User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

#55 Post by TFC » Wed May 26, 2010 4:39 am

Hi,
I try to install this plugin but I give same error.

I try to apply those solution but nothing change.
please look at the image..
Can you have any idea?
Attachments
error.JPG
Errors
error.JPG (73.76 KiB) Viewed 18918 times

levi
Posts: 41
Joined: Wed Oct 24, 2007 1:08 am
Location: Yerevan, Armenia
Contact:

#56 Post by levi » Mon Jun 28, 2010 4:47 am

megatron_007 wrote:thanks! It's fixed!
Hello,
Please can you explain in details what exactly You did to fix it?
I am seeing output similar to Yours (see attached).
I've tried to add:

Code: Select all

settype($number, "integer");
into load.php
without any success.
Thank You!
Attachments
notice.JPG
notice.JPG (79.8 KiB) Viewed 18598 times
Best Regards.

davermenator
Posts: 4
Joined: Wed Jun 30, 2010 9:55 am
Location: USA

#57 Post by davermenator » Thu Jul 01, 2010 1:16 pm

Greetings:

Is this plugin still being supported? I would like to use it, however I am not going to until the bugs have been resolved.

I have done some testing and determined that it works fine when you are drilled into a page with all graphs for a specific interface; however, when you are in the "host" page, there is no number echoed, therefore the "Wrong RRA!" page comes up when trying to save a notice.

Any assistance or updating of this plugin would be greatly appreciated 8)

mstbone67a
Posts: 24
Joined: Mon Sep 21, 2009 9:31 am

Re: Notices 0.1

#58 Post by mstbone67a » Wed Oct 21, 2015 1:54 pm

I added your plugin, but still trying to figure out how to view the notices outside of just the graph you have to click on.

Or directly viewing the device in console.

diazdw
Posts: 2
Joined: Wed Nov 14, 2018 5:30 pm

Re: Notices 0.1

#59 Post by diazdw » Tue Dec 18, 2018 11:53 pm

Hello everyone,

As many of you (I guess) I landed to this page looking for the functionality this plugin offered (in the past). I'm glad to announce that, after some minor changes "here and there", I think I've been able to make work quite well (decently, at least) in my production environment (Cacti Version: 0.8.8b, Plugin Architecture Version: 3.1).

I'm attaching this modified version (which I have named 0.2d) here in case it's useful for anyone else.

DISCLAIMER:
* This is NOT a new version, from scratch, of this plugin: It's only a light modification taking the last version I found (0.2c) as a base.
* I have only tested it with Cacti and PIA version I mentioned before (not sure if it'll work well on other/most recent versions). Feedback about other versions would be appreciated.
* I Googled & changed the icon image used by the plugin as a graph button. Copyright belong to it's respective creator/owner.
* Use it at your own risk.


NOTE: Before trying to make it work, I went by adding a new "comments" field to Cacti graph definition & table and added a title attribute to the img HTML elements for the comments to be display on a mouse over event (as tooltip text). This change work pretty fine. Let me know if your interested in it.

That's all folks. Happy Cacti'ing.
Attachments
notices-0.2d.tar.gz
(37.55 KiB) Downloaded 684 times

Post Reply