Notices 0.1

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Author
Message
rdege
Cacti User
Posts: 59
Joined: Tue Jun 05, 2007 10:20 am
Contact:

1 Question & 1 bug

#16 Post by rdege » Thu May 21, 2009 10:35 am

Hi, I just installed ver 0.2b on 8.7d with PA 2.4, and am now able to set notices for the graph. However, I only have 2 buttons to choose from, "Add Notice", and "Close this Table". I do not see a button called "Add to Graph" or "Delete ...." as indicated by the photo in your previous post.

I also found a bug where I can make two notice windows appear at the same time. I was able to duplicate this on both IE 7.0 and Firefox 2.0. Here's the steps to reproduce the bug.

1) Click the 'N' image next to a graph (The notices window will appear)
2) Click on the public tab
3) Click on the 'N' image next to the graph again (this will spawn a 2nd window)

-Rob

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#17 Post by brezel » Fri May 22, 2009 2:31 am

You have to set the settings for both "Use Ajax" and "Print In Graph".

The second one is not a bug, i just havn't found a more elegant way to open the private and public tab at the same time.

rdege
Cacti User
Posts: 59
Joined: Tue Jun 05, 2007 10:20 am
Contact:

#18 Post by rdege » Fri May 22, 2009 7:47 am

I found the additional settings. Thank you for the quick reply.

-Rob

jerrison
Cacti User
Posts: 55
Joined: Fri Dec 29, 2006 4:02 am

#19 Post by jerrison » Mon May 25, 2009 8:00 am

Moin Brezel,

i just tried you plugin and found one error i could resolve, the other...not quite.

In load.php you "check permissions" for realm_id = 124. The realm_id i got after installing the plugin was 113 for "Notices Add Comments". Without changing this to 113 the "inhalt" variable had no values.

now i´m still stuck with with the graph display because in tree view i can only comment the very first graph no matter where i click the "N". It seems there might be an issue with enumerating all graphs that are displayed (i use "host view" only). this occures wether ajax is on or off.

greetz,
andré

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#20 Post by brezel » Wed May 27, 2009 2:08 am

At the moment it is only possible to open it at the first graph, there will be a possiblity to save notices for the others in a while. Also a third buttons to open both tables.

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#21 Post by brezel » Fri May 29, 2009 2:43 am

So here's another version^^

1.) Possibility to Add Notices to all Graphs on a Page.
2.) New Button to open public and private table and once

Please report me any bugs :)
Attachments
notices_02c.tar
Notices 0.2c
(164.5 KiB) Downloaded 2257 times
Last edited by brezel on Fri May 29, 2009 8:18 am, edited 1 time in total.

jerrison
Cacti User
Posts: 55
Joined: Fri Dec 29, 2006 4:02 am

#22 Post by jerrison » Fri May 29, 2009 7:39 am

Hi,

i couldn´t get this to load.
Deinstalled 0.2b and tried to install 0.2c, Plugin-Management said: "Old Plugin Architecture - Running" and i got some SQL Errors next to my graph.
sorry to say :(.

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#23 Post by brezel » Fri May 29, 2009 8:16 am

Is there a "rra_id" column in the notices table in your cactidb?
try to recreate it with

Code: Select all

ALTER TABLE `cacti`.`notices` DROP `rra_id`; 
ALTER TABLE `cacti`.`notices` ADD `rra_id` INT NOT NULL DEFAULT '1';
if there is none try to create it with

Code: Select all

ALTER TABLE `cacti`.`notices` ADD `rra_id` INT NOT NULL DEFAULT '1';

jerrison
Cacti User
Posts: 55
Joined: Fri Dec 29, 2006 4:02 am

#24 Post by jerrison » Fri May 29, 2009 9:07 am

yup, rra-field exists.

Still leaves the problem with the Plugin-Structure :).

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#25 Post by brezel » Fri May 29, 2009 10:42 am

Does it work now? I saw i uploaded a wrong version where the default auf the column was NULL and not 1, try to recreate if its still default NULL.

I changed it back to the old PA so it appears right in Plugin Management.

r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

error

#26 Post by r_chetanjain » Wed Jun 17, 2009 12:09 pm

I am getting a error "Wrong RRA" while adding a notice with the version 2c.... Also i see the following error in my httpd error log

[Wed Jun 17 11:51:26 2009] [error] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/html/cacti_new/plugins/notices/load.php on line 103, referer: http://localhost/cacti_new/graph_view.p ... first=true
[Wed Jun 17 11:56:31 2009] [error] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/html/cacti_new/plugins/notices/load.php on line 103, referer: http://localhost/cacti_new/graph_view.p ... eaf_id=192

I am using

Cacti Version 0.8.7d
Plugin Architecture 2.4


Chetan Jain

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#27 Post by brezel » Thu Jun 18, 2009 3:42 am

Which settings are you using? Does this error occur at every graph? And can you please look up whether the notices table in your database has an column named rra_id with default 1?

brezel

r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

yes

#28 Post by r_chetanjain » Fri Jun 19, 2009 10:36 am

Yes, i have rra_id set to default 1.... Whenever i open any graphs i get that error and when i try to set a notice to a graph, i get Invalid rra...

Chetan Jain.

ivan-impuls
Posts: 23
Joined: Mon Jun 15, 2009 1:09 am

#29 Post by ivan-impuls » Sat Jun 20, 2009 9:48 am

I am getting a error "Wrong RRA" too...
Nothing check in setttings tab for notices plugin...
Also i see the following error in my graphs:

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/share/cacti/site/plugins/notices/load.php on line 103

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/share/cacti/site/plugins/notices/load.php on line 112

Cacti Version - 0.8.7d
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux 2.6.26-2-686
Web Server - Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch
PHP - 5.2.6-1+lenny3
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mcrypt, mysql, mysqli, PDO, pdo_mysql, snmp
MySQL - 5.0.51a-24+lenny1
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
  • Network Discovery (discovery - v0.8.5)
    Documents (docs - v0.1)
    Host Info (hostinfo - v0.2)
    Device Monitoring (monitor - v0.8.2)
    Notices (Notices - v0.2c)
    Realtime for Cacti (realtime - v0.32)
    Thresholds (thold - v0.4.1)
    Network Tools (tools - v0.3)
    Watermark (watermark - v0.1)

brezel
Posts: 27
Joined: Thu Oct 30, 2008 6:42 am

#30 Post by brezel » Wed Jun 24, 2009 5:27 am

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

Code: Select all

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

Post Reply