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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

zgamer wrote:Great plug-in!!!

Noticed a bug with it under Cacti 0.8.7e running CAMM 1.6.4b, even though you can change the database source and you can in the configuration change the table names only the database source actual is working.
In the settings you can specify the name of the table to use it before processing messages. (such a scheme [table pre] -> [camm poller run] -> [main table]). The default option without this table ([Main Table] <-> [camm poller run]).
But this does not change the name of the main table.
So it's not a error.


I upload new version in first post:
CAMM --- 1.6.5 ---2009-11-25
  • - Switch to use ExtJS 3.0.3.
    - Added [E-mail format] in rule - standart/html;
    - Added [Include data] in rule - Include cacti device description in email;
    - Use new, "pretty" the format of the text from mcutting (without the use of tags in the field of Alert - these tags can be used directly in the field of rules);
    - Added color selection for Traps (TrapSeverity Normal = Green and TrapSeverity Major = Red) (mpdsville1)

    - Fix bug with export data to excel, if the data contains a string '<br>';
    - Fix : use mysql_affected_rows () instead db_fetch_cell ( "SELECT ROW_COUNT ()") to work correctly with mysql 4 versions (Wannes);
After updating the files, be sure to press CTRL + F5 to refresh your browser cache!
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

CAMM Version 1.6.5

Post by pthaynes »

Hello GTHE.

Thanks for the latest version - the description field in the emails makes everything a bit more readable.

I have upgraded one of my Cacti boxes to 1.6.5 of CAMM (Cacti version 0.8.7c With plugin architecture 2.2 running on Centos). When I click on the CAMM tab using Firefox it works fine. Under IE 7 I get the message "Loading Cacti camm plugin" and it never gets further than that. I do get the little exclaimation mark on the bottom left. Clicking on it reveals the attached error.

Regards,

Peter
Attachments
camm page open.JPG
camm page open.JPG (25.52 KiB) Viewed 4691 times
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

I get frequently this kind of error when I try to apply a rule:

"11/30/2009 03:54:21 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `plugin_camm_temp` (`device_type_name`,`device_type_id`,`hostname`,`gr_f`,`gr_v`,`type`,`period`,`agentip_source`,`dev_count`,`count`) SELECT 'Markers','-1',CONCAT(IFNULL(`marker_name`,'no_marker_name'),' [',`alert`,']'),'marker',`alert`,'syslog',`week`,'0',`ccount`,`ccount` FROM (SELECT `alert`, 'week',count(*) as ccount FROM `syslog_ng`.`plugin_camm_syslog` as sysl WHERE WEEKOFYEAR(`sys_date`)=49 and `alert` > 0 and `status` = '2' GROUP BY `sysl`.`alert`) as t left join `plugin_camm_rule` on (`t`.`alert`=`plugin_camm_rule`.`marker`) '
11/30/2009 03:54:19 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `plugin_camm_temp` (`hostname`,`gr_f`,`gr_v`,`type`,`period`,`agentip_source`,`count`) SELECT `sysl`.`host`, 'priority',`sysl`.`priority`, 'syslog','week',`sysl`.`sourceip`,count(*) FROM `syslog_ng`.`plugin_camm_syslog` as sysl WHERE WEEKOFYEAR(`sys_date`)=49 GROUP BY `host`, `sysl`.`priority`'
11/30/2009 03:54:15 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `plugin_camm_temp` (`hostname`,`gr_f`,`gr_v`,`type`,`period`,`agentip_source`,`count`) SELECT `sysl`.`host`, 'facility',`sysl`.`facility`, 'syslog','week',`sysl`.`sourceip`,count(*) FROM `syslog_ng`.`plugin_camm_syslog` as sysl WHERE WEEKOFYEAR(`sys_date`)=49 GROUP BY `host`, `sysl`.`facility`' "

Also new rule doesn't match any record but if I place a query with the same keyword the query display it.
The old rules work ok.

Any idea?

Regards
Alex
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

Re: CAMM Version 1.6.5

Post by gthe »

smlick wrote:I get frequently this kind of error when I try to apply a rule:

..............

Any idea?

Regards
Alex
1062 - duplicate key error. Try this

Code: Select all

truncate table plugin_camm_temp
pthaynes wrote:Hello GTHE.

.........

Peter
here is the fix - just unrar and replace file
Attachments
cacti.plugin.camm-min.rar
(54.79 KiB) Downloaded 160 times
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

Re: CAMM Version 1.6.5

Post by pthaynes »

gthe wrote:here is the fix - just unrar and replace file
GTHE - that fix worked.

Thanks for the quick response.

Regards,

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

Re: CAMM Version 1.6.5

Post by smlick »

gthe wrote:
smlick wrote:I get frequently this kind of error when I try to apply a rule:

..............

Any idea?

Regards
Alex
1062 - duplicate key error. Try this

Code: Select all

truncate table plugin_camm_temp
pthaynes wrote:Hello GTHE.

.........

Peter
here is the fix - just unrar and replace file
Tnx for your fast support.
I replaced the file and seems to work perfectly.

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
cabana281
Posts: 8
Joined: Mon Jul 27, 2009 3:02 pm
Location: Quebec

JSON Object

Post by cabana281 »

Hi,

Everytime I try to go to the stat tab this error occurs.

It doesn't show this error when there is no trap, but it does when there's some trap in the table. I see some weird format line for some traps but I'm not sure why it would affect the stats tab.

Thanks!
Attachments
camm.JPG
camm.JPG (117.75 KiB) Viewed 4571 times
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

Yesterday something doesn't go in the right direction :(
Probably I get a db corruption, so I replace the syslog_ng db with a previous one but I get ever "loading startup variables" inside firefox or IE and CAMM doesn't start.
I tried from different PC.
I tried also to replace the Cacti db with a previous one and also update CAMM to the latest 1.6.51 but nothing has changed.

Any idea? Something to try?

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

Re: JSON Object

Post by gthe »

cabana281 wrote:Hi,

Everytime I try to go to the stat tab this error occurs.

It doesn't show this error when there is no trap, but it does when there's some trap in the table. I see some weird format line for some traps but I'm not sure why it would affect the stats tab.

Thanks!
Can you send me the output of this query:

Code: Select all

"SELECT * FROM settings where name like 'camm_%';"
smlick wrote:Yesterday something doesn't go in the right direction :(
Probably I get a db corruption, so I replace the syslog_ng db with a previous one but I get ever "loading startup variables" inside firefox or IE and CAMM doesn't start.
I tried from different PC.
I tried also to replace the Cacti db with a previous one and also update CAMM to the latest 1.6.51 but nothing has changed.

Any idea? Something to try?

Regards
Alessio
Uninstall/install camm ? - this will be recreate tables
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 »

Uninstall and reinstall CAMM now all ok.
I did it without read your post (I tried all possibilities).
Thanks anyway for your valuable help and fast reply.

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Post by sini »

Hi gthe,

First of all thank you for this great plugin! Really nice work!
Everything works fine on my test system.
I just thinking of some improvements and just like to ask whether is there already a similar plan or feature request? I read all over this topic and if i am right pthaynes would like something similar like me.

So i really like to see event filters (on new tab for example) and a corresponding narrower event list views which shows maching events.

A bit detailed, in this new view (tab) we could create different filtered views based on sql queries which can be created like the alert rules.
For example create a filter view for switch-group and a view for core-routers and a filter view for linux-hosts or something else based on the host group templates.
In the base filter view there will be all created filter views with its short stats that only show summarized percent|count of each priority`s of maching events like on the left side on syslog tab. For detailed information there will be button to view the actual maching events which fits the exact filter query (with all of its details we choosed to show: host|facility|priority etc. It will be nice to see the syslog event first and last occurence also but i think this is a bit complicated to track all syslog entry.) The maching event list page will be auto refresh like the base syslog page (dock in|out from main window?) and an acknowledge button also would be nice which deletes the event from this window or the whole syslog entry from the database.

What do you think about it?Is it possible?

That was my thoughts about this great plugin and again really thank you for all your work on CAMM!
Sini
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Feature Request

Post by mcutting »

gthe - Can we have an option to select which row headers to display ? for example, I never use the "host" header - only Actions, Description, Facility, Priority, DateTime, Message, and Alert...

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Re: Feature Request

Post by sini »

mcutting wrote:gthe - Can we have an option to select which row headers to display ? for example, I never use the "host" header - only Actions, Description, Facility, Priority, DateTime, Message, and Alert...

Thanks
Hi,

It is already implemented! Click on any columns right side (arrow) to select visible columns.
Attachments
col.png
col.png (46.46 KiB) Viewed 4317 times
Sini
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Re: Feature Request

Post by mcutting »

sini wrote:
mcutting wrote:gthe - Can we have an option to select which row headers to display ? for example, I never use the "host" header - only Actions, Description, Facility, Priority, DateTime, Message, and Alert...

Thanks
Hi,

It is already implemented! Click on any columns right side (arrow) to select visible columns.
Yes, I know :)

However, after around 2-3 days, these settings are discarded ny JSON, and you need to set it again :(
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Filter events

Post by pthaynes »

sini wrote:So i really like to see event filters (on new tab for example) and a corresponding narrower event list views which shows maching events.
I agree it would be nice to be able to get the filter to show up automatically. I would envisage this could be done by updating the URL when you apply a filter eg:

Code: Select all

http://cactiserver/plugins/camm/camm_view.php?type=router&mark=none
Just in case you aren't aware sini you can filter events already by clicking on the little arrow (circled in the attached picture) and then filling out the necessary filtering.

The only thing missing from the list is the "Type" of host. You can filter on a single host though. You can filter on the "alert" field - but that can only be set using a rule.

Ideally where you have a NOC that "responds" to syslogs of certain types it would be nice to be able to manually set the alert flag (maybe show the alert field when you click on the magnifying glass to edit a record).

Regards,

Peter
Attachments
camm drop down for filter.JPG
camm drop down for filter.JPG (45.98 KiB) Viewed 4233 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests