camm - rule= Marker does not work

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

camm - rule= Marker does not work

Post by torstentfk »

Hello,

small problem:
I created a rule to mark all syslog-msg containing PIM-Errors (see pict 2).
Manually starting this rule (pict1) work fine and the syslogs are marked.
But the automatic marking does not work.
Attachments
camm-pim-rule.gif
camm-pim-rule.gif (33.42 KiB) Viewed 4541 times
camm-pim.gif
camm-pim.gif (2.37 KiB) Viewed 4542 times
Last edited by torstentfk on Fri Jul 23, 2010 3:20 am, edited 1 time in total.
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Add: I noticed since I updated the .js script from the forum no marker is working anymore.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Enable debug mode in camm's settings and wait for poller run. After this look in cacti log file for debug info.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

done:
cacti.log

Code: Select all

07/23/2010 12:41:49 PM - camm: Poller[0]    - Process only new records
07/23/2010 12:41:49 PM - camm: Poller[0]    - SQL where conditions=[((((message like '%VLAN\_MISMATCH%'  OR message like '%duplex mi
smatch%' ) OR message like '%EC-SP-5-CANNOT\_BUNDLE\_LACP%' ) OR message like '%VLAN MISMATCH%' ) OR message like '%VLAN mismatch%' 
) AND  `syslog`.`plugin_camm_syslog_incoming`.`status`=1]
07/23/2010 12:41:49 PM - camm: Poller[0]    - No need select records to process.  Updated records=[40]
and the syslog-rule as the first picture and the camm-rule as second
Attachments
camm.gif
camm.gif (11.15 KiB) Viewed 4461 times
camm-rule.gif
camm-rule.gif (22.99 KiB) Viewed 4461 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Can you, for test, disable using plugin_camm_syslog_incoming and recheck rule ?
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 »

upd:
Or change string 527-528 in poller_camm.php
from

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");	

to

Code: Select all

 			db_execute("INSERT INTO `" . read_config_option("camm_syslog_db_name") . "`.`plugin_camm_syslog` (`id`, `host`, `sourceip`, `facility`, `priority`, `sys_date`, `message`, `status`, `alert`) " .
 						"SELECT `id`,`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]
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

mh... then all incomming syslogs are not transfered from the incoming table to the normal table - correct?
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

gthe wrote:upd:
Or change string 527-528 in poller_camm.php
from

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");	

to

Code: Select all

 			db_execute("INSERT INTO `" . read_config_option("camm_syslog_db_name") . "`.`plugin_camm_syslog` (`id`, `host`, `sourceip`, `facility`, `priority`, `sys_date`, `message`, `status`, `alert`) " .
 						"SELECT `id`,`host`, `sourceip`, `facility`, `priority`, `sys_date`, `message`, `status`, `alert` FROM " . $syslog_table . " WHERE status=2");						
changed it and seems to populate the rules;
recreating the drop-down-menu: seems to work, too

Let's see during the weekend if all markers are working fine and email alert+marking will work.

Thanks for fixing it.

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

Post by gthe »

Will wait for result of this fix.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

ok. some test-results of the weekend:
- marking works
- automatic recreating the menu with new markers does not work
- manual creating marker menu works
- changing rules and marker id is not populated to the db:
Changed marker 119 to marker-id 51 but in the syslog-part the messages are marked with "Rule 119".
Does the field "Rule" display the rule or the marker-id? In both cases I do not have any rule 119.
Attachments
camm-rule119.gif
camm-rule119.gif (5.48 KiB) Viewed 4292 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

torstentfk wrote:ok. some test-results of the weekend:
- marking works
- automatic recreating the menu with new markers does not work
- manual creating marker menu works
- changing rules and marker id is not populated to the db:
Changed marker 119 to marker-id 51 but in the syslog-part the messages are marked with "Rule 119".
Does the field "Rule" display the rule or the marker-id? In both cases I do not have any rule 119.
Rule column show id (id's) of rules under which gets the message. In the right menu is displayed [marker] and its name. Change the marker to the rule will lead to its change in the right menu.
torstentfk wrote: - automatic recreating the menu with new markers does not work
I do not understand this
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

ok - Rule is therefore an internal number - as I cannot see this id;

Problem:
- I changed the marker-ids and the order of the rules of existing rules. On the left site the old IDs are displayed.

- in the setting section I defined a "automatic tree update interval" of 10 or 30 minutes. I suppose that this shoudl be the time at which the left menu is created. This does not work since the update you gave me
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

torstentfk wrote:ok - Rule is therefore an internal number - as I cannot see this id;
in rules tab set visible ID column.
torstentfk wrote: Problem:
- I changed the marker-ids and the order of the rules of existing rules. On the left site the old IDs are displayed.

- in the setting section I defined a "automatic tree update interval" of 10 or 30 minutes. I suppose that this shoudl be the time at which the left menu is created. This does not work since the update you gave me
Its work on my test and prod servers. Try enable debug mode and wait for rows like this in cacti log:
07/26/2010 06:09:34 PM - camm: Poller[0] S. CAMM [syslog] Tree was recreated for [6.6915] sec with rezult=[1]
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

done - error is here : look at the date:

Code: Select all

07/26/2010 01:31:49 PM - camm: Poller[0] S3. Checking to determine if it's time to run AutoCreate Tree Menu.
07/26/2010 01:31:49 PM - camm: Poller[0] S3.1 The next syslog Tree to DB run time has been determined to be at '1970-01-01 0:00:00'. Last run time was '1970-01-01 0:00:00'
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests