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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
pthaynes
Cacti User
Posts: 56
Joined: Mon Apr 20, 2009 1:29 am
Location: Australia

Re: Rule Processing

Post by pthaynes »

gthe

Thanks again for your work on this plugin.

After thinking about it a bit more I am guessing using the template to select log items would have an impact on the performance of the database. I have added multiple "!=" clauses to my rules to de-select the hosts that I don't want to send emails for. It would be interesting to compare the impact of selecting based on template vs selecting based on multiple hosts. If the ability to select based on a template impacts all rules (even if you don't use that feature) I would suggest not using it (for example if you need to do a database join on the template id whether the rule selects using that field or not). If it only impacts users when they actually use that feature I would suggest adding the feature and a warning when people use it.

If you aren't able to change the rule processing to match based on the "mark" for a log entry I don't think changing the order of rule processing will make much difference. At the moment (correct me if I am wrong) the rules are processed in the order:
First: Rules that delete
Second: Rules that email
Third: Rules that mark

I wouldn't think you would want to change the order of the rules (I can't imagine wanting to send an email for a log entry and then deleting the entry immediately, nor wanting to mark a log entry only to have it deleted). The only thing that might change that is the order of "execute user funtion" rules, only because you might want to run some sql in a user function that might impact later processing for a rule (although I would think that would be rare).

Thanks again.

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 »

I just installed the new version tonight, and I've noticed a problem.

I had an issue with it loading up correctly in Firefox which I've resolved, but when I tried it in IE7, and it loads, but there's a slight visual issue as indicated in the image below.
Attachments
SP32-20090801-220902.gif
SP32-20090801-220902.gif (22.33 KiB) Viewed 3672 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

Re: Rule Processing

Post by gthe »

pthaynes wrote: The only thing that might change that is the order of "execute user funtion" rules, only because you might want to run some sql in a user function that might impact later processing for a rule (although I would think that would be rare).
Agree. Will be in settings.
pthaynes wrote: If it only impacts users when they actually use that feature I would suggest adding the feature and a warning when people use it.
well, I will try
streaker69 wrote:I just installed the new version tonight, and I've noticed a problem.

I had an issue with it loading up correctly in Firefox which I've resolved, but when I tried it in IE7, and it loads, but there's a slight visual issue as indicated in the image below.
thanks, fixed.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Re: Rule Processing

Post by gthe »

pthaynes wrote: At the moment (correct me if I am wrong) the rules are processed in the order:
First: Rules that delete
Second: Rules that email
Third: Rules that mark
Wrong.
Do not confuse the order of rules and order of actions in the rule.
Rules selected fron db based on order

Code: Select all

ORDER BY `is_delete` DESC, `count_triggered` DESC;
ie - first rule with the greatest possible number of deleted records. Each rule can have multiple actions. They are executed in this order
user functions
mail
delete OR mark
So, I want to introduce 2 parameters:
Order of rules:
- default
- based on a new special field "order" in rule
Order of actions:
- default ("func","mail","del","mark")
-"mail","func","mark","del"
- any new
I think this will allow more flexibility to process records.

Do you agree?
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

I think this is a minor visual error. If you set the default number of rows in settings to something other than 50 (I have mine set to 100) then the stats at the bottom displays the incorrect number of rows retrieved even though the select box shows the correct number per the settings.

If you use the select box, to change the number of rows, then it displays properly.

See the attached image.
Attachments
CAMM.gif
CAMM.gif (6.19 KiB) Viewed 3558 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 »

The new version in the first post.
CAMM --- 1.6.3 ---2009-08-07
  • - Switch to use ExtJS 2.3.0. before you updated on this with any previous version - you can completely remove directories: camm/images/default, camm/images/slate, camm/images/vista;
    - Added new config settings - [Rule order];
    - Added new config settings - [Action order in each rule];
    - Added new grid [Incorrect devices] in stats tab. Used to quickly determine the possible incorrect device. For example, if the device DEV1 and DEV2 belong to the same type of T1, and the device DEV1 sends a message, and the device DEV2 does not - then perhaps it is (DEV2) configured incorrectly ;
    - Fix IE visual bug in menu;
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]
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

streaker69 wrote:I think this is a minor visual error. If you set the default number of rows in settings to something other than 50 (I have mine set to 100) then the stats at the bottom displays the incorrect number of rows retrieved even though the select box shows the correct number per the settings.

If you use the select box, to change the number of rows, then it displays properly.

See the attached image.
Replace file from this archive (for 1.6.3 only):
Attachments
camm_db.rar
(7.48 KiB) Downloaded 181 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

Post by pthaynes »

gthe wrote:The new version in the first post.
CAMM --- 1.6.3 ---2009-08-07
  • - Switch to use ExtJS 2.3.0. before you updated on this with any previous version - you can completely remove directories: camm/images/default, camm/images/slate, camm/images/vista;
    - Added new config settings - [Rule order];
    - Added new config settings - [Action order in each rule];
    - Added new grid [Incorrect devices] in stats tab. Used to quickly determine the possible incorrect device. For example, if the device DEV1 and DEV2 belong to the same type of T1, and the device DEV1 sends a message, and the device DEV2 does not - then perhaps it is (DEV2) configured incorrectly ;
    - Fix IE visual bug in menu;
After updating the files, be sure to press CTRL + F5 to refresh your browser cache!
GTHE
The ordering for rule processing and action processing looks good. Sorry for not responding to your previous post about adding that functionality - I have been mostly offline for the last week or so.

Could you please explain the "Incorrect Device" tab a little more? To me the logic seems to be:
1. If a device of a device type has sent a syslog then highlight the "syslog cell" for all devices of that device type that have not sent a syslog.
2. If a device of a device type has sent an snmptrap then highlight the "snmptrap cell" for all devices of that device type that have not sent an snmptrap.

Is this correct?

Thanks for the update.

Regards,

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

Date/Time missing after upgrade to 1.6.3

Post by mcutting »

Gthe,

The Date/Time data appears to be missing after upgrade to 1.6.3 ??

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

Re: Date/Time missing after upgrade to 1.6.3

Post by gthe »

pthaynes wrote: Could you please explain the "Incorrect Device" tab a little more? To me the logic seems to be:
1. If a device of a device type has sent a syslog then highlight the "syslog cell" for all devices of that device type that have not sent a syslog.
2. If a device of a device type has sent an snmptrap then highlight the "snmptrap cell" for all devices of that device type that have not sent an snmptrap.

Is this correct?
Yes.
mcutting wrote:Gthe,

The Date/Time data appears to be missing after upgrade to 1.6.3 ??

Thanks
it seems that yes, and this is strange, because it depends on the browser. It works in google chrome. :cry:
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 »

Not working for me in either Firefox or Internet Explorer. Cache cleared on both occasions. V 1.6.2 doesn't have this issue.

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
jpgr
Posts: 1
Joined: Tue Aug 11, 2009 1:01 pm

Post by jpgr »

I'm having the same issue -- traptime not appearing in Firefox/IE for version 1.6.3. I can filter on traptime, so it looks like a presentation issue of some sort.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Yes, I have been working on a fix for this problem
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Here is the fix: a new patch 3 more posts
Last edited by gthe on Fri Aug 14, 2009 1:25 am, edited 1 time in total.
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 »

Confirmed as working :) :)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests