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

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
mcutting
Cacti Guru User
Posts: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#46 Post by mcutting » Thu Apr 02, 2009 1:51 am

Gthe,

I use plugin_camm_syslog_incoming (memory)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

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

#47 Post by gthe » Thu Apr 02, 2009 3:15 am

Can you run sql:

Code: Select all

INSERT INTO `syslog`.`plugin_camm_syslog` SELECT * FROM `syslog`.`plugin_camm_syslog_incoming` WHERE status=2
and show me the error from mysql
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: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#48 Post by mcutting » Thu Apr 02, 2009 3:20 am

I knew you'd ask me that !

I tried to run this directly inside phpmyadmin (copied from camm_poller), and it works fine !

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

mcutting
Cacti Guru User
Posts: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#49 Post by mcutting » Thu Apr 02, 2009 3:46 am

Strange thing is, that the error messages appear to have "stopped". Yesterday, and early this AM, I see the enclosed.

Now I see a completely clean event log !
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

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

#50 Post by gthe » Thu Apr 02, 2009 5:09 am

I think this is the fix in poller_camm.php:420
before

Code: Select all

db_execute("INSERT INTO `" . read_config_option("camm_syslog_db_name") . "`.`plugin_camm_syslog` " . "SELECT * FROM " . $syslog_table . " WHERE status=2");
change to

Code: Select all

db_execute("INSERT INTO `" . read_config_option("camm_syslog_db_name") . "`.`plugin_camm_syslog` (`host`, `sourceip`, `facility`, `priority`, `sys_date`, `message`, `status`, `alert`) " . " SELECT `host`, `sourceip`, `facility`, `priority`, `sys_date`, `message`, `status`, `alert` FROM " . $syslog_table . " WHERE status=2");
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: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#51 Post by mcutting » Thu Apr 02, 2009 5:12 am

Thanks - just put this in.

Will report back here if any issues.

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

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

#52 Post by gthe » Thu Apr 02, 2009 5:16 am

Can you answer also in this topic ?

Thanks.
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: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#53 Post by mcutting » Thu Apr 02, 2009 5:33 am

Replied in post. :)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

savagemindz
Posts: 10
Joined: Wed Feb 14, 2007 10:39 am

#54 Post by savagemindz » Thu Apr 02, 2009 9:00 am

Hi gthe,

We have a few problems I am hoping you can help with.

1) Email address validation on the add rule window doesn't appear to allow a "-" before the @ in the email address. So [email protected] doesn't work but [email protected] does? Any ideas?

2) We have a test rule we cannot delete. When we attempt to delete it it ask if we are sure and after clicking yes I get an error window saying "no ID."

3) Final one is more of a feature request rather than a bug. Is it possible to have an option to send one mail per trap rather than grouping traps together and sending one mail with all traps?

Thanks
iain

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

#55 Post by gthe » Thu Apr 02, 2009 9:09 am

savagemindz wrote:Hi gthe,

We have a few problems I am hoping you can help with.

1) Email address validation on the add rule window doesn't appear to allow a "-" before the @ in the email address. So [email protected] doesn't work but [email protected] does? Any ideas?
will try fix it in next version
savagemindz wrote: 2) We have a test rule we cannot delete. When we attempt to delete it it ask if we are sure and after clicking yes I get an error window saying "no ID."
use last version - 1.5.2
savagemindz wrote: 3) Final one is more of a feature request rather than a bug. Is it possible to have an option to send one mail per trap rather than grouping traps together and sending one mail with all traps?

Thanks
iain
need time to implement this
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: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#56 Post by mcutting » Fri Apr 03, 2009 1:17 am

Gthe - have the colours (and all other issues you've ironed out) be in the next release ?

Also, I have a syslog which contains priority "ermerg", which I am sure was on my syslog config.php (see a couple of posts ago). However, when this alert arrives, it is with a white background, and not red (should be the same as crit)

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

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

#57 Post by gthe » Fri Apr 03, 2009 3:01 am

mcutting wrote:Gthe - have the colours (and all other issues you've ironed out) be in the next release ?
I think yes
mcutting wrote: Also, I have a syslog which contains priority "ermerg", which I am sure was on my syslog config.php (see a couple of posts ago). However, when this alert arrives, it is with a white background, and not red (should be the same as crit)

Thanks
ermerg != emerg.
But a found mistake (Emerg but not emerg) and fix it. will be in next release.
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: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#58 Post by mcutting » Fri Apr 03, 2009 3:27 am

Thanks - could you tell me which file to amend for the "emerg" function to work ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

mcutting
Cacti Guru User
Posts: 1874
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

#59 Post by mcutting » Fri Apr 03, 2009 4:20 am

Gthe,

One thing I have noticed is that collected data is not in any order - can it be in alphabetical ? I expect that this has to do with the field joins ? Example is below

EDIT - looking at the code, this is an easy fix:

Locate line 845

Code: Select all

$tree_lists = db_fetch_assoc("SELECT * FROM plugin_camm_tree WHERE `type`='"  . $type_tree . "' order by device_type_name, agentip, eventname ");
Replace with

Code: Select all

$tree_lists = db_fetch_assoc("SELECT * FROM plugin_camm_tree WHERE `type`='"  . $type_tree . "' order by device_type_name asc, description, eventname ");
This works for me, as I am using the "IP only" join, and using the description field in CACTI to identify my devices.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b

savagemindz
Posts: 10
Joined: Wed Feb 14, 2007 10:39 am

#60 Post by savagemindz » Mon Apr 06, 2009 3:43 am

Hi gthe

2) We have a test rule we cannot delete. When we attempt to delete it it ask if we are sure and after clicking yes I get an error window saying "no ID."
use last version - 1.5.2
We are using 1.5.2?

Also thanks for taking a look at the other two things too. This is plugin is absolutely fantastic. ;-)

Thanks

iain

Post Reply