CaMM (Cacti Message Management) plugin v1.6.7 2010-08-26

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
hammer733
Posts: 22
Joined: Fri Aug 20, 2010 6:47 pm

Post by hammer733 »

Uninstalled old Plugin and installed new one fresh. Still getting these errors in the Cacti Log, and on first run. Please help. If I can manually fix this please instruct me how and I will do so.
Attachments
2010-08-30_061916.jpg
2010-08-30_061916.jpg (93.82 KiB) Viewed 4448 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

hammer733 wrote:Uninstalled old Plugin and installed new one fresh. Still getting these errors in the Cacti Log, and on first run. Please help. If I can manually fix this please instruct me how and I will do so.
first of all - this error is for plugin_camm_syslog_incoming table. Do you use it ? By default it is disable.
If you really need this - run this sql:

Code: Select all

DROP TABLE IF EXISTS `plugin_camm_syslog_incoming`;
CREATE TABLE  `plugin_camm_syslog_incoming` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `host` varchar(128) DEFAULT NULL,
  `sourceip` varchar(45) NOT NULL,
  `facility` varchar(10) DEFAULT NULL,
  `priority` varchar(10) DEFAULT NULL,
  `sys_date` datetime DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `alert` smallint(3) unsigned NOT NULL DEFAULT '0',
  `add` varchar(50) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `facility` (`facility`),
  KEY `priority` (`priority`),
  KEY `sourceip` (`sourceip`),
  KEY `status` (`status`),
  KEY `status_date` (`status`,`sys_date`),
  KEY `sys_date` (`sys_date`),
  KEY `alert` (`alert`)
) ENGINE=MEMORY
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
hammer733
Posts: 22
Joined: Fri Aug 20, 2010 6:47 pm

Post by hammer733 »

Just did a fresh install on a new cacti install and still getting this error in the cacti log. This is excluding the plugin_camm_syslog_incoming errors that is still there, but as mentioned I decided to abort using that db anyway so ignoring those. Would really love to get this thing working, but just can't seem to get data flowing in.
Attachments
2010-08-31_094431.jpg
2010-08-31_094431.jpg (20.04 KiB) Viewed 4407 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

hammer733, try this:
1. Uninstall plugin;
2. Check -that all tables are dropped by this sql:
mysql> use cacti;
Database changed
mysql> show tables like '%camm_%';
Empty set (0.00 sec)
3. Check for camm settings:
mysql> select * from settings where name like 'camm%';
Empty set (0.00 sec)
4. Check for relams:
mysql> SELECT * FROM plugin_realms where plugin='camm';
Empty set (0.00 sec)
5. Check for pia db changes:
mysql> SELECT * FROM plugin_db_changes where plugin='camm';
Empty set (0.00 sec)
After that try install plugin, enable it and open for autoupdate.
Show me error (if occur) and you OS and mysql version.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
lex8009
Posts: 37
Joined: Thu May 18, 2006 4:30 pm

CAMM 1.5.4 missing message for syslog

Post by lex8009 »

Hi, I upgraded the CAMM to 1.5.4 from 1.5.3 and now it doesn't display the messages. What's odd is that this is happening on syslog messages only.

Local 7 messages are displayed correctly, but Syslog messages only only showing the time stamp.

Currently running 0.8.7e with PIA 2.5

TIA
Attachments
camm.JPG
camm.JPG (66.58 KiB) Viewed 4342 times
hammer733
Posts: 22
Joined: Fri Aug 20, 2010 6:47 pm

Post by hammer733 »

gthe, Thank you for all the help and this wonderful plugin. See attachment for your request. Hope it will be of some use.
I am using CactiEZ the latest version. Have also tried on a fresh Ubuntu install without success as well.
Attachments
2010-09-02_125343.jpg
2010-09-02_125343.jpg (135.87 KiB) Viewed 4337 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

hammer733,
Replace setup.php file by this from archive.
Then uninstall plugin, install,enable it and stop.
Run this sql:

Code: Select all

show create table plugin_camm_syslog\G;
and then open camm page and look for errors.
Attachments
setup.zip
(13 KiB) Downloaded 168 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
hammer733
Posts: 22
Joined: Fri Aug 20, 2010 6:47 pm

Post by hammer733 »

Thanks, Will give this a try in a couple hours and let you know. One thing I did not mention was that my OS is 64bit (CentOS 64Bit v4.7). Don't think that would matter but something I had not mentioned before. I also used 64bit install when I set up the Ubuntu 10.04 Lucid server to test. Thanks again.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Bug in camm_db.php

Post by mcutting »

There appears to be a bug in camm_db.php

Code: Select all

								$rows = db_fetch_assoc("SELECT if((`_is_marker`=1 and `_parent`=0),`id`,`id`) as _id, " .
				
					" if(`_is_type`=1, IF(`_is_marker`=1,`device_type_name`,CONCAT('',`device_type_name`)),if(`_is_device`=1,IF(`device_id`>0,CONCAT('',`description`),IF(`_is_marker`=1,`hostname`,CONCAT('IP: ',`hostname`))),IF(`_lvl`=5,`gr_v`,IF(`_is_leaf`='0',CONCAT(`gr_f`,'\'s'),CONCAT(`gr_f`,': ',`gr_v`))))) as label, " .
					" if(`_is_type`=1,`typ_count`,if(`_is_device`=1,`dev_count`,IF(`_lvl`=4,IF(`_is_leaf`='0','',`count`),`count`))) as count, " . 
					" if(`_is_type`=1, round((`typ_count`/" . $all_count . ")*100,1),if(`_is_device`=1,round((`dev_count`/`typ_count`)*100,1),IF(`_lvl`=4,IF(`_is_leaf`='0','',round((`count`/`dev_count`)*100,1)),round((`count`/`dev_count`)*100,1)))) as perc, " . 
					" if(`_is_leaf`='0', 'false','true') as _is_leaf, " .
					" if(`_parent`='0',null,`_parent`) as _parent, " .
					" `hostname`, `_lvl` " .
					" FROM plugin_camm_tree2 where `type`='" . $type_tree . "' and `period`='" . $period . "' " .
					//" ORDER by id;");
					//" ORDER by device_type_name, description, gr_f, count;");
					" ORDER by _is_marker,_path;");
The current configuration means that the sort order of the tree is messed up after a short period of time, as the ordering is done by field "_is_marker_path". Changing to the below code

Code: Select all

				$rows = db_fetch_assoc("SELECT if((`_is_marker`=1 and `_parent`=0),`id`,`id`) as _id, " .
				
					" if(`_is_type`=1, IF(`_is_marker`=1,`device_type_name`,CONCAT('',`device_type_name`)),if(`_is_device`=1,IF(`device_id`>0,CONCAT('',`description`),IF(`_is_marker`=1,`hostname`,CONCAT('IP: ',`hostname`))),IF(`_lvl`=5,`gr_v`,IF(`_is_leaf`='0',CONCAT(`gr_f`,'\'s'),CONCAT(`gr_f`,': ',`gr_v`))))) as label, " .
					" if(`_is_type`=1,`typ_count`,if(`_is_device`=1,`dev_count`,IF(`_lvl`=4,IF(`_is_leaf`='0','',`count`),`count`))) as count, " . 
					" if(`_is_type`=1, round((`typ_count`/" . $all_count . ")*100,1),if(`_is_device`=1,round((`dev_count`/`typ_count`)*100,1),IF(`_lvl`=4,IF(`_is_leaf`='0','',round((`count`/`dev_count`)*100,1)),round((`count`/`dev_count`)*100,1)))) as perc, " . 
					" if(`_is_leaf`='0', 'false','true') as _is_leaf, " .
					" if(`_parent`='0',null,`_parent`) as _parent, " .
					" `hostname`, `_lvl` " .
					" FROM plugin_camm_tree2 where `type`='" . $type_tree . "' and `period`='" . $period . "' " .
					//" ORDER by id;");
					" ORDER by device_type_name, description, gr_f, count;");
					//" ORDER by _is_marker,_path;");
Resolves this issue, and the tree is sorted correctly.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
hammer733
Posts: 22
Joined: Fri Aug 20, 2010 6:47 pm

Post by hammer733 »

gthe,
Great news. Followed your instructions and camm loaded with zero errors for the first time. Then I looked in the camm setup/1st run logs and again, no errors. Then looked for syslog messages but none coming in. So, since I am using CatiEZ rather than a fresh install I created a plugin_camm_syslog table in the default syslog database and then changed the camm plugin settings to point there and bingo, all started working. So, I think I need to change the pipe and some php.conf settings and all will be fine. Plan is to just use camm for all syslog and traps now. Will try everything on a fresh new Ubuntu machine and report back, but I am confident you got it fixed. Tempted to ask what the difference is in the php setup files, but I would most likely not understand anyway. Thanks so much for the help.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Re: Bug in camm_db.php

Post by gthe »

mcutting wrote:There appears to be a bug in camm_db.php

Resolves this issue, and the tree is sorted correctly.
What exactly was the error in sorting?
Menu in the construction is already sorted by name by this sql:

Code: Select all

db_execute("UPDATE plugin_camm_tree2, (SELECT t1.id, concat_ws('-',t4.id ,t3.id,t2.id,t1.id) as _pth FROM plugin_camm_tree2 AS t1 LEFT JOIN plugin_camm_tree2 AS t2 ON t2.id = t1._parent LEFT JOIN plugin_camm_tree2 AS t3 ON t3.id = t2._parent LEFT JOIN plugin_camm_tree2 AS t4 ON t4.id = t3._parent order by t1.device_type_name, t1.description) as tmp set `plugin_camm_tree2`.`_path`=`_pth` where plugin_camm_tree2.id=tmp.id;");
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Agree, but without this change, the tree was never in alphabetical order. Emptying the contents of the table works when the tree gets recreated, but after around 10 minutes, the list is all out of order.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
cruxx
Posts: 16
Joined: Thu Sep 09, 2010 7:36 am
Location: Schwerin, Germany

sys_grid is undefined

Post by cruxx »

Hi there,

after updating to version 1.6.7 I get the following error in the browser (IE8 and firefox)

Code: Select all

Message: 'sys_grid' is undefined
Line: 1
Char: 346742
Code: 0
URI: http://<server-ip>/cacti/plugins/camm/js/cacti.plugin.camm-min.js
It is not possible to navigate through the events.

Has anyone an idea?
Attachments
sys_grid.jpg
sys_grid.jpg (828.38 KiB) Viewed 4106 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

cruxx,

try this:
Attachments
cacti_plugin_camm_v1_6_75.zip
(1.2 MiB) Downloaded 340 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
cruxx
Posts: 16
Joined: Thu Sep 09, 2010 7:36 am
Location: Schwerin, Germany

Post by cruxx »

found it :D

replace "sys_grid" with "d".

Code: Select all

var h=d.getStore()
Greetings :wink:
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests