Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import error #5

Open
Fisiu opened this issue Aug 31, 2015 · 4 comments
Open

Import error #5

Fisiu opened this issue Aug 31, 2015 · 4 comments

Comments

@Fisiu
Copy link

Fisiu commented Aug 31, 2015

Hi,

I tried to import this template, but I get erros:

mb_strlen() expects parameter 1 to be string, array given [conf.import.php:130 → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CDiscoveryRule->create() → CDiscoveryRule->createReal() → DB::insert() → DB::checkValueTypes() → zbx_strlen() → mb_strlen() in /usr/share/zabbix/include/func.inc.php:955]
mysqli_real_escape_string() expects parameter 2 to be string, array given [conf.import.php:130 → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CDiscoveryRule->create() → CDiscoveryRule->createReal() → DB::insert() → DB::checkValueTypes() → zbx_dbstr() → mysqli_real_escape_string() in /usr/share/zabbix/include/db.inc.php:1224]
Array to string conversion [conf.import.php:130 → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CAPIObject->create() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CDiscoveryRule->create() → CDiscoveryRule->createReal() → DB::insert() → implode() in /usr/share/zabbix/include/classes/db/DB.php:450]
Error in query [INSERT INTO items (name,type,snmp_community,snmp_oid,delay,status,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,delay_flex,params,ipmi_sensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key_,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('Interfaces','4','public','.1.3.6.1.2.1.2.2.1.2','30','0','','','0','0','','0','','','','','0','','','','','',Array,'1','','snmp.discovery','','10117','1','4','0',NULL,'24499')] [Unknown column 'Array' in 'field list']
Error in query [INSERT INTO items (name,type,snmp_community,snmp_oid,delay,status,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,delay_flex,params,ipmi_sensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key_,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('Interfaces','4','public','.1.3.6.1.2.1.2.2.1.2','30','0','','','0','0','','0','','','','','0','','','','','',Array,'1','','snmp.discovery','','10117','1','4','0',NULL,'24499')".

I use zabbix 2.2.10 on CentOS 7 (with mariadb 5.5.44).

@YSmetana
Copy link
Owner

Hi. I am sorry about that.

Probably an incompatibility issue. Please consider to upgrade you installation to Zabbix 2.4.

@menyesg
Copy link

menyesg commented Sep 4, 2015

Hi, I'm experiencing the same issue. We are using Zabbix 2.2.9 and I get the same errors az Fisiu. I need a Mikrotik template just like yours... isn't there a way to fix this somehow?
(we cannot upgrade our Zabbix installation due to compatibility issues)

@YSmetana
Copy link
Owner

YSmetana commented Sep 8, 2015

isn't there a way to fix this somehow?

You can install Zabbix 2.4 on spare/virtual server, import the template and copy all the items manually to your Zabbix 2.2.

Also you can recreate it from the screenshots:

screenshot_15-09-08_12-54-45
screenshot_15-09-08_12-55-04
screenshot_15-09-08_12-55-29
screenshot_15-09-08_12-57-41

@berlevdv
Copy link

Hi! I'm use zabbix 2.2.2 and have the same errors when import this template.
But i found the reason, and delete sections (also, i do not need them - port status down/up):

<filter>
<value>@Mikrotik interfaces</value>
</filter>

and

<trigger_prototypes>
<trigger_prototype>
<expression>{Template_Mikrotik_SNMP:.1.3.6.1.2.1.2.2.1.7.[&quot;{#SNMPINDEX}&quot;].last(0)}=1 and {Template_Mikrotik_SNMP:.1.3.6.1.2.1.2.2.1.8.[&quot;{#SNMPINDEX}&quot;].last(0)}&lt;&gt;1</expression>
<name>{#SNMPVALUE} is down on {HOST.NAME}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>

There is exported template for Zabbix 2.2 based on commits on Mar 14, 2015:
http://www.extralan.ru/wp-content/uploads/2015/09/zabbix_2.2-mikrotik-snmp.zip

YSmetana thanks for template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants