Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 26, 2019 11:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Thu Jun 25, 2009 4:27 am 
Offline

Joined: Thu Apr 26, 2007 5:27 am
Posts: 25
ivan-impuls wrote:
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


I do have that problem too but think I found where it comes from. Printing th rra_id as suggested made me look at the url and saw 'rra_id=all' and 'all' isn't a number so the select is complaining about that.

Edit:
I had line 103 print the select statement and it looks like mysql is right ;-), Notice the empty rra_id= clause

SELECT notice FROM notices WHERE rra_id = AND graph_id =6 AND user_id =1

host_id is probably what you want here.

Regards,

Joop


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 25, 2009 4:40 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
the rra_id notices uses is another then the one in the URL ,it a number for each graph like in the image below.

it should be saved in $number in baum.php line 5 and load.php also line 5(from $rra["id"]) it seems that it don't do this


Attachments:
rra.JPG
rra.JPG [ 4.21 KiB | Viewed 17776 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 12:38 am 
Offline

Joined: Thu May 22, 2008 2:09 am
Posts: 33
so is there a solution for this problem? im experiencing the same problem

_________________
Template: Cisco CatOS
Mactrack: Netscreen Fw
_______________
Cacti Version - 0.8.7e, Plugin Architecture - 2.5, Poller Type - Cact-Spine 0.8.7e
Server Info - Ubuntu Server 8.10 (2.6.27-7-server), Web Server - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
PHP - 5.2.6-2ubuntu4.3, MySQL - 5.0.67-0ubuntu6-log, RRDTool - 1.3.1, SNMP - 5.4.1
Plugins - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 1:33 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
I still can't reproduce it, can someone post the output of the code i posted before? It should look like on the screenshoot above.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 3:16 am 
Offline

Joined: Mon Jun 15, 2009 1:09 am
Posts: 23
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);


I done this.
Nothing appear...

[/img]


Attachments:
.JPG
.JPG [ 93.58 KiB | Viewed 17710 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 3:47 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
can you add

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


in line 120 in setup.php under

Code:
global $config,$rra;


does a number appear then?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 5:55 am 
Offline

Joined: Mon Jun 15, 2009 1:09 am
Posts: 23
No, nothing changes.
The same picture.
Sorry for my English.
I'm from Russia...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 7:10 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
Can you post lines 98 and 99 in your graph.php from cacti basedirectory?

I have no clue why $rra["id"] contains no data


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 7:31 am 
Offline

Joined: Mon Jun 15, 2009 1:09 am
Posts: 23
###98str
<a href='graph.php?action=zoom&local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $rra["id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><img src='images/graph_zoom.gif' border='0' alt='Zoom Graph' title='Zoom Graph' style='padding: 3px;'></a><br>

###99str
<a href='graph_xport.php?local_graph_id=<?php print $_GET["local_graph_id"];?>&rra_id=<?php print $rra["id"];?>&view_type=<?php print $_REQUEST["view_type"];?>'><img src='images/graph_query.png' border='0' alt='CSV Export' title='CSV Export' style='padding: 3px;'></a><br>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 08, 2009 7:30 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
I won't be able to look for this for 6 weeks, so after changing

Code:
$number = $rra["id"];


(line 5 in load.php and line 5 in baum.php) in

Code:
if(is_numeric($rra["id"]))
{
  $number = $rra["id"];
}
else
{
  $number = 1;
}


the plugin should behave like in 0.2b (only one window for one notice).


Top
 Profile  
 
 Post subject: Notices 0.2c and Cacti 0.8.7e and PIA 0.8.7e
PostPosted: Fri Jul 10, 2009 7:13 am 
Offline

Joined: Thu Apr 26, 2007 5:27 am
Posts: 25
Hi Brezel,

I don't have the mysql errors with this combination but found two other things:

- you're using <script src="'.$config['url_path'].'/plugins/notices/prototype.js"> in baum.php but that leads to
//plugins/notices/prototype.js which is slowing down pageloads quite a bit.

- when trying to delete a comment it doesn't work. Log entries from Cacti show the delete followed by a (re) insert of the same data
Code:
07/10/2009 02:02:21 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO notices (host_id, rra_id, user_id, notice) VALUES ('1', '1', '1', '')"
07/10/2009 02:02:21 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "DELETE FROM notices WHERE host_id =1 AND rra_id=1 AND user_id =1"


Other than that is looks like its is working.

Regards,

Joop


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 21, 2009 7:35 am 
Offline

Joined: Fri Jul 17, 2009 3:00 am
Posts: 5
Hi,

I have same problem , but only @ Graphs -> Tree Mode

:?


Attachments:
notice_error.JPG
notice_error.JPG [ 44.09 KiB | Viewed 17497 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 21, 2009 8:28 am 
Offline

Joined: Fri Jul 17, 2009 3:00 am
Posts: 5
I resolve my problem :)
@ begin of load.php
after string >
Code:
$number = $rra["id"];

add
Code:
settype($number, "integer");


p.s. mb not correct, but for me all work fine.
:oops:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 05, 2009 6:54 am 
Offline

Joined: Sat Dec 08, 2007 3:54 pm
Posts: 22
Could someone help me to fix this:
(I can't post any remarks, maybe it's a permission issue. )

Image

[/img]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 07, 2009 1:49 am 
Offline

Joined: Thu Oct 30, 2008 6:42 am
Posts: 27
It looks like the User has no permissions to the Plugin ,have you activated it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 11 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

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group