CaMM plugin v1.6.5 issue when editing new rule
Moderators: Developers, Moderators
CaMM plugin v1.6.5 issue when editing new rule
When I try to edit a new rule in the field "SQL filter" i'm getting "1=1" ...
I have selected "SQL filter" then the field "syslog - message" then I put operator "=" and value "GigabitEthernet1/0/2" :
- When I test it return nothing, and when i click on "done" the rule is showing "message is null" ...
if I select "SQL filter" then the field "syslog - message" then I put operator "contains" and value "GigabitEthernet1/0/2" :
- When I test : it return nothing, and when i click on "done" the rule is showing SQL filter : "1=1" ...
could someone please help me ???
I have selected "SQL filter" then the field "syslog - message" then I put operator "=" and value "GigabitEthernet1/0/2" :
- When I test it return nothing, and when i click on "done" the rule is showing "message is null" ...
if I select "SQL filter" then the field "syslog - message" then I put operator "contains" and value "GigabitEthernet1/0/2" :
- When I test : it return nothing, and when i click on "done" the rule is showing SQL filter : "1=1" ...
could someone please help me ???
I can not recreate the problem on my host...galerien wrote:Nobody could help me ?
I would apreciate if someone can at least give some clue on this issue ...
Did you try to create a rule based on an existing syslog record?
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
[size=75]Sorry for my English. [/size]
I also tried to create a rule from an existing syslog record without success :
In the field => Filter (Sql), I have got :
((((host is null AND facility is null) AND priority is null) AND sys_date=STR_TO_DATE('2010-01-18 13:35:01','%Y-%m-%d %H:%i:%s')) AND message is null)
I'm lost... please help...
In the field => Filter (Sql), I have got :
((((host is null AND facility is null) AND priority is null) AND sys_date=STR_TO_DATE('2010-01-18 13:35:01','%Y-%m-%d %H:%i:%s')) AND message is null)
I'm lost... please help...
- Attachments
-
- SQLfilter-contains-2.PNG (44.98 KiB) Viewed 4607 times
But now everything is normal? SQL string is correct.galerien wrote:I also tried to create a rule from an existing syslog record without success :
In the field => Filter (Sql), I have got :
((((host is null AND facility is null) AND priority is null) AND sys_date=STR_TO_DATE('2010-01-18 13:35:01','%Y-%m-%d %H:%i:%s')) AND message is null)
I'm lost... please help...
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
[size=75]Sorry for my English. [/size]
Try this version of the file (replace). Enable debug mode in camm setting tab and create new rule.
In cacti.log you will see strings like this:
Post it here with the screen on rule's filter sql.
In cacti.log you will see strings like this:
Code: Select all
01/19/2010 12:10:25 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [raw_json_where]=[{\"left\":{\"left\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local0\",\"value\":\"local0\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"info\",\"value\":\"info\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_STARTS_WITH\",\"values\":[{\"label\":\"INFO: The flooding MAC is detected\",\"value\":\"INFO: The flooding MAC is detected\"}]}}]
01/19/2010 12:10:25 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[((facility='local0' AND priority='info') AND message like 'INFO: The flooding MAC is detected%' )]
- Attachments
-
- camm_db_admin.rar
- (5.46 KiB) Downloaded 105 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
[size=75]Sorry for my English. [/size]
I would like to thank you very much to spend time to try to help me
here are the log, I've got :
01/19/2010 11:43:47 AM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[((((host is null AND facility is null) AND priority is null) AND sys_date=STR_TO_DATE('2010-01-19 05:00:27','%Y-%m-%d %H:%i:%s')) AND message is null)]
01/19/2010 11:43:47 AM - camm: Poller[0] php [camm_convert_json_to_sql_string] [raw_json_where]=[{\"left\":{\"left\":{\"left\":{\"left\":{\"fieldId\":\"host\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"172.xx.yy.3\",\"value\":\"172.xx.yy.3\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"err\",\"value\":\"err\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 05:00:27\",\"label\":\"2010-01-19 05:00:27\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"9438: Jan 19 05:00:26: %SNMP-3-AUTHFAIL: Authentication failure for SNMP req from host 172.xx.vv.41\",\"value\":\"9438: Jan 19 05:00:26: %SNMP-3-AUTHFAIL: Authentication failure for SNMP req from host 172.xx.vv.41\"}]}}]
I just modify the IP which are shown...
and I also add the screen shot of the result :
here are the log, I've got :
01/19/2010 11:43:47 AM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[((((host is null AND facility is null) AND priority is null) AND sys_date=STR_TO_DATE('2010-01-19 05:00:27','%Y-%m-%d %H:%i:%s')) AND message is null)]
01/19/2010 11:43:47 AM - camm: Poller[0] php [camm_convert_json_to_sql_string] [raw_json_where]=[{\"left\":{\"left\":{\"left\":{\"left\":{\"fieldId\":\"host\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"172.xx.yy.3\",\"value\":\"172.xx.yy.3\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"err\",\"value\":\"err\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 05:00:27\",\"label\":\"2010-01-19 05:00:27\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"9438: Jan 19 05:00:26: %SNMP-3-AUTHFAIL: Authentication failure for SNMP req from host 172.xx.vv.41\",\"value\":\"9438: Jan 19 05:00:26: %SNMP-3-AUTHFAIL: Authentication failure for SNMP req from host 172.xx.vv.41\"}]}}]
I just modify the IP which are shown...
and I also add the screen shot of the result :
- Attachments
-
- SQLfilter-contains-3.PNG (61.11 KiB) Viewed 4548 times
What is you environment ? os, php ?galerien wrote:I would like to thank you very much to spend time to try to help me
Now need debug next file. Use it from atach and replace in camm/lib folder and repeat the previous step with save rule.
After post strings from cacti.log
- Attachments
-
- json_sql.rar
- (1.95 KiB) Downloaded 103 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
[size=75]Sorry for my English. [/size]
Here are the infos you asked for :
Cacti Version - 0.8.7e
Plugin Architecture - 2.4
Poller Type - Cactid v
Server Info - Linux 2.6.16.60-0.39.3-smp
Web Server - Apache/2.2.3 (Linux/SUSE)
PHP - 5.2.5
PHP Extensions - libxml, xml, session, pcre, SimpleXML, SPL, standard, Reflection, filter, date, apache2handler, ctype, dom, gd, iconv, json, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp, sockets, SQLite, timezonedb, tokenizer, xmlreader, xmlrpc, zlib
MySQL - 5.0.26
RRDTool - 1.2.27
SNMP - 5.3.0.1
Plugins
- Global Plugin Settings (settings - v0.5)
Thresholds (thold - v0.4.1)
Device Monitoring (monitor - v0.9)
PHP Network Weathermap (weathermap - v0.96a)
Network Discovery (discovery - v0.9)
Realtime Graph Viewer (realtime - v0.36)
Host Info (hostinfo - v0.2)
Network Tools (tools - v0.3)
Update Checker (update - v0.4)
Watermark (watermark - v0.1)
Uptime (uptime - v0.3)
PHP Network Managing (PHP Network Managing - v0.6.1)
CAMM (CActi Message Manager) (CAMM - v1.6.5)
Here are the log when I try to create manally a new rule :
01/19/2010 12:31:09 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[(facility is null AND priority is null)]
01/19/2010 12:31:09 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[] [return]=[priority is null]
01/19/2010 12:31:09 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[] [return]=[facility is null]
01/19/2010 12:31:09 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [raw_json_where]=[{\"left\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"crit\",\"value\":\"crit\"}]}}]
01/19/2010 12:31:09 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[(facility is null AND priority is null)]
01/19/2010 12:31:09 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[] [return]=[priority is null]
01/19/2010 12:31:09 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[] [return]=[facility is null]
01/19/2010 12:31:09 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [raw_json_where]=[{\"left\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"crit\",\"value\":\"crit\"}]}}]
Who is online
Users browsing this forum: No registered users and 2 guests