CaMM plugin v1.6.5 issue when editing new rule
Moderators: Developers, Moderators
I had reloaded the CAMM pluggin, then I was able to create a rule from a syslog entry, here are the log related to this :
01/19/2010 12:38:31 PM - 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 11:59:41','%Y-%m-%d %H:%i:%s')) AND message is null)]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[message] [values]=[] [return]=[message is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[DATE_EQUAL] [fieldId]=[sys_date] [values]=[2010-01-19 11:59:41] [return]=[sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[] [return]=[priority is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[] [return]=[facility is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[host] [values]=[] [return]=[host is null]
01/19/2010 12:38:31 PM - 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.14\",\"value\":\"172.xx.yy.14\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"notice\",\"value\":\"notice\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 11:59:41\",\"label\":\"2010-01-19 11:59:41\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\",\"value\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\"}]}}]
01/19/2010 12:38:31 PM - 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 11:59:41','%Y-%m-%d %H:%i:%s')) AND message is null)]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[message] [values]=[] [return]=[message is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[DATE_EQUAL] [fieldId]=[sys_date] [values]=[2010-01-19 11:59:41] [return]=[sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[] [return]=[priority is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[] [return]=[facility is null]
01/19/2010 12:38:31 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[host] [values]=[] [return]=[host is null]
01/19/2010 12:38:31 PM - 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.14\",\"value\":\"172.xx.yy.14\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"notice\",\"value\":\"notice\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 11:59:41\",\"label\":\"2010-01-19 11:59:41\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\",\"value\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\"}]}}]
I already have the json extension installed :
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
What should I do ?
reinstall PHP ?
Give me some advises please...
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
What should I do ?
reinstall PHP ?
Give me some advises please...
Yes, sorry, I did not notice right away.galerien wrote:I already have the json extension installed :
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
then try to use another json module that came with the plugin. For this in the file camm_functions.php replace the line
Code: Select all
if (function_exists('json_decode')) {
Code: Select all
if (function_exists('json_decode_1')) {
Code: Select all
if (function_exists('json_encode')) {
Code: Select all
if (function_exists('json_encode_1')) {
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]
Fantastic !!!!!!
THANKS YOU VERY VERY MUCH...
It's working fine now
01/19/2010 02:45:10 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[((((host='172.xx.yy.14' AND facility='local7') AND priority='notice') AND sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')) AND message='5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up')]
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[message] [values]=[5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up] [return]=[message='5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[DATE_EQUAL] [fieldId]=[sys_date] [values]=[2010-01-19 11:59:41] [return]=[sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')]
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[notice] [return]=[priority='notice']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[local7] [return]=[facility='local7']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[host] [values]=[172.xx.yy.14] [return]=[host='172.xx.yy.14']
01/19/2010 02:45:10 PM - 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.14\",\"value\":\"172.xx.yy.14\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"notice\",\"value\":\"notice\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 11:59:41\",\"label\":\"2010-01-19 11:59:41\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\",\"value\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\"}]}}]
thanks again
THANKS YOU VERY VERY MUCH...
It's working fine now
01/19/2010 02:45:10 PM - camm: Poller[0] php [camm_convert_json_to_sql_string] [sql_where]=[((((host='172.xx.yy.14' AND facility='local7') AND priority='notice') AND sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')) AND message='5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up')]
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[message] [values]=[5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up] [return]=[message='5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[DATE_EQUAL] [fieldId]=[sys_date] [values]=[2010-01-19 11:59:41] [return]=[sys_date=STR_TO_DATE('2010-01-19 11:59:41','%Y-%m-%d %H:%i:%s')]
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[priority] [values]=[notice] [return]=[priority='notice']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[facility] [values]=[local7] [return]=[facility='local7']
01/19/2010 02:45:10 PM - camm: Poller[0] php [getSQL] [operatorId]=[STRING_EQUAL] [fieldId]=[host] [values]=[172.xx.yy.14] [return]=[host='172.xx.yy.14']
01/19/2010 02:45:10 PM - 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.14\",\"value\":\"172.xx.yy.14\"}]},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"facility\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"local7\",\"value\":\"local7\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"priority\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"notice\",\"value\":\"notice\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"sys_date\",\"operatorId\":\"DATE_EQUAL\",\"values\":[{\"value\":\"2010-01-19 11:59:41\",\"label\":\"2010-01-19 11:59:41\"}]}},\"logicalOperator\":\"AND\",\"right\":{\"fieldId\":\"message\",\"operatorId\":\"STRING_EQUAL\",\"values\":[{\"label\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\",\"value\":\"5514: Jan 19 11:59:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet3/0/16, changed state to up\"}]}}]
thanks again
Thus, the problem was in some of the modules php.
It is a pity that we could not ascertain where.
And after each update, you will need so the same comment on these lines.
Do not forget to return all the file back without additional debug lines.
It is a pity that we could not ascertain where.
And after each update, you will need so the same comment on these lines.
Do not forget to return all the file back without additional debug lines.
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]
a last question could you explain me please what's the difference between the 2 functions the original one and the new one ?
Could you please explain me why my installation is not working with the original camm_functions.php file ?
If I upgrade camm, in the futur, I will have to modify the camm_functions.php file again ?
thanks for the response to this non urgent questions.
I like to understand things ...
Could you please explain me why my installation is not working with the original camm_functions.php file ?
If I upgrade camm, in the futur, I will have to modify the camm_functions.php file again ?
thanks for the response to this non urgent questions.
I like to understand things ...
Yes, This will make use json module from the file JSON.php rather than built-in json php module.galerien wrote:a last question could you explain me please what's the difference between the 2 functions the original one and the new one ?
Could you please explain me why my installation is not working with the original camm_functions.php file ?
If I upgrade camm, in the futur, I will have to modify the camm_functions.php file again ?
thanks for the response to this non urgent questions.
I like to understand things ...
But the next time after updating PHP - try using the native php module - perhaps it will work.
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]
Who is online
Users browsing this forum: No registered users and 4 guests