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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
someone17
Posts: 8
Joined: Sun Jan 31, 2010 6:21 pm

Post by someone17 »

gthe wrote:
someone17 wrote:Maybe this will help:

Code: Select all

02/02/2010 07:27:23 PM - camm: Poller[0] -4 Mark records [1]
02/02/2010 07:27:23 PM - camm: Poller[0] - Select records to process = [0]
02/02/2010 07:27:23 PM - camm: Poller[0] - Found count records==[0]
02/02/2010 07:27:23 PM - camm: Poller[0] - SQL where conditions=[facility='cron' AND `cacti`.`plugin_camm_syslog`.`status`=2]
02/02/2010 07:27:23 PM - camm: Poller[0] - Process already processed record (force execute)
02/02/2010 07:27:23 PM - camm: Poller[0] = Start process rule id=[110] 
run this

Code: Select all

	
select count(*) from `cacti`.`plugin_camm_syslog` where facility='cron' AND `cacti`.`plugin_camm_syslog`.`status`=2;

and show result

Code: Select all

mysql> select count(*) from `cacti`.`plugin_camm_syslog` where facility='cron' AND `cacti`.`plugin_camm_syslog`.`status`=2;
+----------+
| count(*) |
+----------+
|     1115 |
+----------+
1 row in set (0.00 sec)
My tree is now:

Code: Select all

syslog -> Type: markers ->
    IP: hostname --> (in this tree are all records)
    ...
    IP: cron[2] --> marker: 2 --> and there is empty
Processed records have in other tables flag under alerts field.
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

gthe wrote:
smlick wrote:....

So why CAMM sent an insert without value in field marker?

....
because:
`is_mark`='0'
This means that markering is not in principle. We need to look at what is transmitted from browser to server.
in camm_db_admin.php after

Code: Select all



 function camm_save_rule(){
    
 if ( isset($_POST['data'])){
 	
    $ids = $_POST['data']; // Get our array back and translate it :

add this line:

Code: Select all

camm_debug("php camm_save_rule  ids=[" . $ids . "]");

after - save add/save rule again and check cacti.log
smlick wrote: Also for the SMTP problem I find a solution but I didn't understand the problem.
I get SMTP error only in field with multiple account (like pippo@123.it,pluto@123.it), I tried also , or ; like separator but nothing as changed (they work well before).

When I delete multiple address in the email field worked.

Any new ideas :-?
You can use the separator "," and ";". Everything depends on configuration/version of your SMTP server

someone17 wrote:Maybe this will help:

Code: Select all

02/02/2010 07:27:23 PM - camm: Poller[0] -4 Mark records [1]
02/02/2010 07:27:23 PM - camm: Poller[0] - Select records to process = [0]
02/02/2010 07:27:23 PM - camm: Poller[0] - Found count records==[0]
02/02/2010 07:27:23 PM - camm: Poller[0] - SQL where conditions=[facility='cron' AND `cacti`.`plugin_camm_syslog`.`status`=2]
02/02/2010 07:27:23 PM - camm: Poller[0] - Process already processed record (force execute)
02/02/2010 07:27:23 PM - camm: Poller[0] = Start process rule id=[110] 
run this

Code: Select all

	
select count(*) from `cacti`.`plugin_camm_syslog` where facility='cron' AND `cacti`.`plugin_camm_syslog`.`status`=2;

and show result
I did what you said and this is what I get in log:

02/05/2010 09:57:54 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1366', SQL:"INSERT INTO `plugin_camm_rule` SET `is_delete`='0', `is_email`='0', `is_function`='0', `is_mark`='0', `name`='new_rule_1', `order`='1', `rule_type`='syslog', `rule_enable`='0', `sup_mode`='', `marker`='', `notes`='', `date`='2010-02-05T09:57:51', `user_id`='1' '
02/05/2010 09:57:54 AM - camm: Poller[0] php camm_save_rule ids=[[{"is_delete":false,"is_email":false,"is_function":false,"is_mark":false,"name":"new_rule_1","order":1,"rule_type":"syslog","rule_enable":"0","sup_mode":"","marker":"","notes":"","date":"2010-02-05T09:57:51","newRecord":true,"id":null}]]

About the separator no change in our environment and the separator ; works like a charme before.


Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
someone17
Posts: 8
Joined: Sun Jan 31, 2010 6:21 pm

Post by someone17 »

I reinstalled camm plugin and now it works fine for me.

I need to know if it is possible any advanced marking:
e.g. to mark only rules which repeats at least x-times in some time period (e.g. 1 day)
gyterpena
Posts: 3
Joined: Fri Feb 12, 2010 3:40 pm

time period

Post by gyterpena »

Hello If I try to create rule to search for items between some time period I'm not able to change the box from default from:to: if I try to write to it it doesn't accept the input. Also afterwards I always needs to delete cookies as I'm unable to create any other rules as the box with from:to is always there and I'm unable to delete it. See screenshot
Is it possible to search for items let's say between 12:00:00 and 13:00:00 each day? Thanks
Attachments
Screenshot-Cacti - CAMM (CActi Message Managment) - Mozilla Firefox.png
Screenshot-Cacti - CAMM (CActi Message Managment) - Mozilla Firefox.png (94.8 KiB) Viewed 5286 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Re: time period

Post by gthe »

gyterpena wrote:Hello If I try to create rule to search for items between some time period I'm not able to change the box from default from:to: if I try to write to it it doesn't accept the input. Also afterwards I always needs to delete cookies as I'm unable to create any other rules as the box with from:to is always there and I'm unable to delete it. See screenshot
Is it possible to search for items let's say between 12:00:00 and 13:00:00 each day? Thanks
This is a BUG!
Thank you for your message.
press CTRL + F5 and create a new rule like this:
Attachments
camm_date_period.PNG
camm_date_period.PNG (7.42 KiB) Viewed 5273 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
gyterpena
Posts: 3
Joined: Fri Feb 12, 2010 3:40 pm

thanks gthe

Post by gyterpena »

That works fine, one more think is it possible to have rule without date? Just time.
If I would manually edit plugin_camm_rule and change the sql_filter to something like this
((((message like '%cgn:205,cdn:%' AND message not like '%cdn:,%' ) AND priority<>'warning') AND sys_date>=STR_TO_DATE('%09:00:00',' %H:%i:%s')) AND sys_date<=STR_TO_DATE('%17:00:00','%H:%i:%s')
Would that be fine?

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

camm: no marker / email works

Post by torstentfk »

Hello,

fresh installation of the newest camm-plugin. I defined several actions including email and marking. But both are not working. (setting-plugin installed).
What should I examine to get this great improved syslog-view plugin working?

Torsten
Attachments
rules.gif
rules.gif (43.63 KiB) Viewed 5197 times
syslogs.gif
syslogs.gif (77.38 KiB) Viewed 5197 times
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Re: camm: no marker / email works

Post by mcutting »

torstentfk wrote:Hello,

fresh installation of the newest camm-plugin. I defined several actions including email and marking. But both are not working. (setting-plugin installed).
What should I examine to get this great improved syslog-view plugin working?

Torsten
Have a look at this:
mcutting wrote:I think I have found a bug...

I have the latest version of the settings plugin, which is now at v6 (PIA 2x compatible). Despite this, the mail function no longer works, and complains the settings plugin is missing.

In setup,.php, look at the lines

Code: Select all

 function camm_check_dependencies() {
 	global $plugins, $config;
 	$rezult = false;
 	if (in_array('settings', $plugins)) {
 		$v = settings_version();
 		if ($v['version'] >= 0.2) {
 			$rezult = true;
 		}
Temporarily, I've bodged this to make it work, as I have lost email functionality, by changing

Code: Select all

if (in_array('settings', $plugins)) {
to

Code: Select all

if (!in_array('settings', $plugins)) {
Not very elegant at all, and only a super-quick fix to get things running again. Perhaps gthe could factor in the new release of the PIA2.x compliant settings plugin into the code ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hi mcutting,

problem solved - problem was at the syslog-ng config:
I copied the config line (sql-statement) from a wrong source into the syslog-ng.cfg - the status-field was set to "1" and not "0". (the "0" was stated in another camm-docu...)

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

Post by smlick »

Hi gthe, any news about the next release.
Can you tell us about the future improvement.

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

Problem with marker ..

Post by blugger »

Hi together,

first of all - a great tool. I hope you continue the development on this.

Second, I have some problems with the Markers:

I defined some markers, gave them names but when I re-create the tree (syslog) it only shows for example ...

no_marker_name [122]

and not the real defined marker name. Something the is strange is that it is not possible to define a marker with number "122" at all.

Can somebody help?

BR
Ben
armstrongzhao
Posts: 28
Joined: Mon Feb 02, 2009 10:21 am
Location: CHINA

Post by armstrongzhao »

I copie the CAMM to the /var/www/html//plugins. The camm tab works fine. I believe that the table of plugin_camm_syslog is receiving message. But the syslog message can not display on the window.

destination d_mysql {
pipe("/tmp/mysql.pipe"
template("INSERT INTO plugin_camm_syslog (host, sourceip, facility, priority, sys_date, message, status) VALUES ( '$HOST', '$SOURCEIP', '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC', '$MSG', '0' );\n")
template-escape(yes)
);
};

log { source(net); destination(d_mysql); };
log { source(s_sys); destination(d_mysql); };
Attachments
cammsyslog.jpg
cammsyslog.jpg (101.29 KiB) Viewed 4920 times
patrulla
Posts: 6
Joined: Tue Mar 02, 2010 8:14 am

Doubts with function in camm

Post by patrulla »

Hello everyone, I am again using Cacti and I have some doubts, you know how to execute scripts or any external program when defining rules, for example to add a script to run when a rule is activated.

Thank you very much and I await your response
mihho66
Posts: 6
Joined: Thu Jul 03, 2008 12:25 am

CAMM "SNMP Traps" tab can not show anything

Post by mihho66 »

Hello everyone,

I have one question, when I click the "SNMP traps" and "Unknows Traps" tab, it show the nothing, what's the problem.
I have checked the mysql table "snmptt" and "snmptt_unknown", there have data in it.

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

Re: Problem with marker ..

Post by gthe »

blugger wrote:Hi together,

first of all - a great tool. I hope you continue the development on this.

Second, I have some problems with the Markers:

I defined some markers, gave them names but when I re-create the tree (syslog) it only shows for example ...

no_marker_name [122]

and not the real defined marker name. Something the is strange is that it is not possible to define a marker with number "122" at all.

Can somebody help?

BR
Ben
This limitation of the current version - marker must be is less than 100.
Just over the processing of this functional in the new version I am working.

armstrongzhao and mihho66:
Enable debug mode in camm setting's tab and look for error in cacti log file.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests