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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

gthe wrote:
smlick wrote:
I try CTRL+F5 and also IE and FF.
In the attach a screenshot (no ID).

Regards
Alessio
You use table plugin_camm_syslog_incoming in settings (Syslog incoming table)?
torstentfk wrote:works....

thanks
You can check the problem as a Smlick?
No I use plugin_camm_syslog in Syslog incoming table.

regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

smlick,
I send you debug file in pm.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

double post
Last edited by smlick on Tue Jul 06, 2010 2:56 am, edited 1 time in total.
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

Tnx gthe for your fast support that are the line in log:

07/06/2010 09:53:24 AM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1140', SQL:"SELECT CONVERT(GROUP_CONCAT(concat(t2.`rule_id`, ' [',t3.name, ']'),';\r\n' SEPARATOR '') USING UTF8) as rules_name,t1.*,host.description, host.host_template_id, host.id as device_id FROM (SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451' ) as t1 Left join host on (t1.`sourceip`=`host`.`hostname` ) left join plugin_camm_keys as t2 on (t2.`krid`=t1.`id`) left join plugin_camm_rule as t3 on (t2.rule_id=t3.id) ;"
07/06/2010 09:53:24 AM - SYSTEM CAMM DEBUG: camm_get_full_sys_mes query=SELECT CONVERT(GROUP_CONCAT(concat(t2.`rule_id`, ' [',t3.name, ']'),';\r\n' SEPARATOR '') USING UTF8) as rules_name,t1.*,host.description, host.host_template_id, host.id as device_id FROM (SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451' ) as t1 Left join host on (t1.`sourceip`=`host`.`hostname` ) left join plugin_camm_keys as t2 on (t2.`krid`=t1.`id`) left join plugin_camm_rule as t3 on (t2.rule_id=t3.id) ;
07/06/2010 09:53:24 AM - SYSTEM CAMM DEBUG: camm_get_full_sys_mes id=36548451
07/06/2010 09:53:24 AM - SYSTEM CAMM DEBUG: camm_get_full_sys_mes get_request_var_request(dir)=
07/06/2010 09:53:24 AM - SYSTEM CAMM DEBUG: camm_get_full_sys_mes get_request_var_request(id)=[36548451]


Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

smlick,
Very strange....
Can you run this queries in mysql command line and show me the full error output / results ?

Code: Select all

SELECT CONVERT(GROUP_CONCAT(concat(t2.`rule_id`, ' [',t3.name, ']'),';\r\n' SEPARATOR '') USING UTF8) as rules_name,t1.*,host.description, host.host_template_id, host.id as device_id FROM (SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451' ) as t1 Left join host on (t1.`sourceip`=`host`.`hostname` ) left join plugin_camm_keys as t2 on (t2.`krid`=t1.`id`) left join plugin_camm_rule as t3 on (t2.rule_id=t3.id) ;

Code: Select all

SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451'
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

gthe wrote:smlick,
Very strange....
Can you run this queries in mysql command line and show me the full error output / results ?

Code: Select all

SELECT CONVERT(GROUP_CONCAT(concat(t2.`rule_id`, ' [',t3.name, ']'),';\r\n' SEPARATOR '') USING UTF8) as rules_name,t1.*,host.description, host.host_template_id, host.id as device_id FROM (SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451' ) as t1 Left join host on (t1.`sourceip`=`host`.`hostname` ) left join plugin_camm_keys as t2 on (t2.`krid`=t1.`id`) left join plugin_camm_rule as t3 on (t2.rule_id=t3.id) ;

Code: Select all

SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451'
This is what I get:

mysql> SELECT CONVERT(GROUP_CONCAT(concat(t2.`rule_id`, ' [',t3.name, ']'),';\r\
n' SEPARATOR '') USING UTF8) as rules_name,t1.*,host.description, host.host_temp
late_id, host.id as device_id FROM (SELECT * FROM `syslog_ng`.`plugin_camm_syslo
g` where `id`='36548451' ) as t1 Left join host on (t1.`sourceip`=`host`.`hostna
me` ) left join plugin_camm_keys as t2 on (t2.`krid`=t1.`id`) left join plugin_c
amm_rule as t3 on (t2.rule_id=t3.id) ;
ERROR 1146 (42S02): Table 'syslog_ng.host' doesn't exist
mysql> SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451';
Empty set (0.00 sec)

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Do You run this sql before queries :

Code: Select all

use <you_cacti_db>;
also try

Code: Select all

SELECT * FROM settings where name = 'camm_syslog_db_name';
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

gthe wrote:Do You run this sql before queries :

Code: Select all

use <you_cacti_db>;
also try

Code: Select all

SELECT * FROM settings where name = 'camm_syslog_db_name';
Yes I selected my db using :"use syslog_ng" before insert your query.

This is what I get with your last select:

ERROR 1146 (42S02): Table 'syslog_ng.settings' doesn't exist


Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

smlick wrote:
gthe wrote:Do You run this sql before queries :

Code: Select all

use <you_cacti_db>;
also try

Code: Select all

SELECT * FROM settings where name = 'camm_syslog_db_name';
Yes I selected my db using :"use syslog_ng" before insert your query.

This is what I get with your last select:

ERROR 1146 (42S02): Table 'syslog_ng.settings' doesn't exist


Regards
Alessio
Does you cacti db is syslog_ng ?
Check it in cacti/include/config.php -$database_default = ?

I guess that is something like cacti and you must use this database
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

No my cacti db is cacti but my syslog db is syslog_ng.
I have done something wrong?

Tnx
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

I tried your select also in cacti db and I get:

ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause


mysql> SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451';
Empty set (0.00 sec)

But I think I have to use it with syslog_ng db


Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Well, all right. When you work with Cacti, by default its database cacti - so you need

Code: Select all

use cacti;
and perform queries.

and this ...
gthe wrote:

Code: Select all

SELECT * FROM settings where name = 'camm_syslog_db_name';
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

gthe wrote:Well, all right. When you work with Cacti, by default its database cacti - so you need

Code: Select all

use cacti;
and perform queries.

and this ...
gthe wrote:

Code: Select all

SELECT * FROM settings where name = 'camm_syslog_db_name';
As I said in my previous post I tried your select also with cacti db (use cacti) but with no fortune:

ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause


mysql> SELECT * FROM `syslog_ng`.`plugin_camm_syslog` where `id`='36548451';
Empty set (0.00 sec)
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

smlick,

Although these requests have failed - they are performed correctly.
The point error that the plugin tries to find the message by id, which does not exist. And this is very strange. Ie If a message is displayed in the camm - so it is exist, but when we look for - it is no longer.
This may be due to the fact that the plugin information is taken from one base, while the search is on another database.
That's why I asked you to run a query -

Code: Select all

SELECT * FROM cacti.settings where name = 'camm_syslog_db_name';
it will show in what base is configured plugin.
and try this:

Code: Select all

SELECT * FROM `cacti`.`plugin_camm_syslog` where `id`='36548451'; 
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Upgrade to version 1.6.62

Post by pthaynes »

GTHE - Thanks for the update to the plugin. It seems to feel like the CAMM page comes up much more quickly.

You may want to update the installation instructions on the front page of this topic. I followed the instruction that says:
In order to process all records in the new scheme - follow these instructions after updating plugin Code:
"Truncate table plugin_camm_tree2;"
and Code:
"update <you_syslog_db>.plugin_camm_syslog set `status`='0';"
. Warning - this may cause a large load during the next cycle of the poller.
I did it without thinking and noticed several thousand emails came through to me. Setting the status to zero forces Cacti to reprocess ALL messages in the syslog database. If I had thought about it I probably wouldn't have bothered setting that status (or would have disabled my email rules first) and just let the marking happen correctly on new entries.

Thanks again for the excellent plugin.

Regards,

Peter
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests