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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

Post by mcutting »

This might explain the plugin startup issues better. In FF, the window hangs for 10 seconds, then starts. IE, I get this error message
Attachments
Untitled.png
Untitled.png (12.25 KiB) Viewed 3068 times
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

Email rule in CAMM does not seem to work

Post by pthaynes »

When I do a tcpdump on the server it seems that there is a trailling semi-colon character in the RCPT TO: line.
I ran an sql update command to change my email field for the email rules and remove the trailling semicolon. After doing that my email rules worked fine (both when forcing them to run and when they automatically run).

So I can now confirm that if the trailling semicolon is taken off the email rule works fine. I'm not sure what happens when you have two email addresses. After a bit more digging around I thought I'd change the list of addresses on the rule to my address followed by a comma and then someone else's address. That worked as well.

Could I suggest that maybe the email address format in that field for the rules should be user@domain,user2@domain rather than using a ;?

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

Post by gthe »

Based on RFC 2821
4.1.1.3 RECIPIENT (RCPT)

This command is used to identify an individual recipient of the mail
data; multiple recipients are specified by multiple use of this
command. The argument field contains a forward-path and may contain
optional parameters.
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 »

gthe wrote:Based on RFC 2821
4.1.1.3 RECIPIENT (RCPT)

This command is used to identify an individual recipient of the mail
data; multiple recipients are specified by multiple use of this
command. The argument field contains a forward-path and may contain
optional parameters.
I can confirm that this works fine for me. No issues with the trailing ";"
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: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

cspenpen wrote:
gthe wrote:cspenpen - try this file.

Unrar and replace it in cacti/plugins/camm/lib/
thx gthe

Finally I use uninstall and reinstall camm in pluging manager solve this.

But in 1.6.0 the global search (in database) function can't work, even I install a new camm in another test site.

I don't know why..@@
Looks like it works now

07/15/2009 08:00:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:101
07/15/2009 07:50:43 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:74
07/15/2009 07:35:49 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:105
07/15/2009 07:20:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:83
07/15/2009 07:05:58 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:129
07/15/2009 06:55:52 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:58
07/15/2009 06:45:47 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:73
07/15/2009 06:35:43 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:117
07/15/2009 06:20:54 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:258
07/15/2009 06:05:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:316
07/15/2009 05:50:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:121
07/15/2009 05:35:46 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:140
07/15/2009 05:20:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:152
07/15/2009 05:05:47 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:214
07/15/2009 04:50:48 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:130
07/15/2009 04:40:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:159
07/15/2009 04:25:44 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:144
07/15/2009 04:10:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:202
07/15/2009 03:55:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:95
07/15/2009 03:45:44 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:142
07/15/2009 03:30:48 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:188
07/15/2009 03:15:47 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:91
07/15/2009 03:05:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:224
07/15/2009 02:50:45 AM - SYSTEM camm AutoPurge STATS: del_traps:0 del_unk_traps:0 del_sys_messages:131

:)
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

Post by gthe »

Can U show me this ?

Code: Select all

SELECT * FROM settings where name = 'camm_sys_delay_purge_day';
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 »

gthe wrote:Can U show me this ?

Code: Select all

SELECT * FROM settings where name = 'camm_sys_delay_purge_day';

Code: Select all

camm_sys_delay_purge_day 1 
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
pdallaire
Posts: 5
Joined: Wed Jul 15, 2009 8:28 am

Re: Email rule in CAMM does not seem to work

Post by pdallaire »

pthaynes wrote:
When I do a tcpdump on the server it seems that there is a trailling semi-colon character in the RCPT TO: line.
I ran an sql update command to change my email field for the email rules and remove the trailling semicolon. After doing that my email rules worked fine (both when forcing them to run and when they automatically run).
I have the exact same problem with emails. Do you mind giving us the SQL command to fix this issue? Thanks!
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

This is unusual - what mail server are you guys using ? If it's Exchange, then this definately works.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
pdallaire
Posts: 5
Joined: Wed Jul 15, 2009 8:28 am

Post by pdallaire »

Well, does it uses Cacti's mail preferences? If so, it's using linux's "sendmail" command and thus, must be why ";" aren't accepted as separators.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

It does use the SETTINGS plugin, so if it's SendMail, then this might be why.
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

Re: Email rule in CAMM does not seem to work

Post by pthaynes »

Thanks everyone for your responses.

pdallaire
I have the exact same problem with emails. Do you mind giving us the SQL command to fix this issue? Thanks!
Here is my SQL statement

Code: Select all

update plugin_camm_rule set email="username@domain" where email<>"";
You'll have to substitute in your email address of course. If you want to add in multiple email addresses just separate them with a comma.

mcutting
This is unusual - what mail server are you guys using ? If it's Exchange, then this definately works.
I am using exchange as the email server. My cacti is setup to use SMTP for email in the settings plugin. My OS is CentOS (it was built from CactiEZ). Details of the important parts of my build are below.
Cacti Version - 0.8.7c
Plugin Architecture - 2.2
Poller Type - Cactid v
Server Info - Linux 2.6.9-78.0.13.ELvm-smp
Web Server - Apache/2.0.63 (CentOS)
PHP - 5.1.6
Plugins
  • Global Plugin Settings (settings - v0.6)
I have noticed that the Manage plugin uses a comma as the separator for it's email address field in the settings plugin. That is what started me down the comma path. Either way my impression was that SMTP required mutliple RCPT TO: lines if you had multiple addresses to send to, rather than having a single RCPT TO: line with a semi-colon separated list - when sending to a single address there should be no trailling character.

Hope this helps.

Regards,

Peter
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Great Plugin, I just got it running here, works great.

I have noticed a slight visual anomaly in the syslog view.

Attached is a screenshot.
Attachments
SP32-20090715-223009.gif
SP32-20090715-223009.gif (5.72 KiB) Viewed 2959 times
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

streaker69
Here there's nothing to be done - wider window of a browser is necessary.


I.e. the email address format should be such:
or
?
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

Email format in CAMM

Post by pthaynes »

gthe,

Both those formats will work (based on my testing and the email setting of SMTP in the settings plugin).
gthe wrote:I.e. the email address format should be such:
or
?
Thanks again for your help.

Regards,

Peter
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests