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

Cant import Node Template #2

Closed
qroac opened this issue Aug 6, 2015 · 5 comments
Closed

Cant import Node Template #2

qroac opened this issue Aug 6, 2015 · 5 comments

Comments

@qroac
Copy link

qroac commented Aug 6, 2015

Using latest versions from naizvoru.com/raspbian/zabbix Repository:

Kategorie "Memory" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory commitment" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory commitment in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory limit" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory limit in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory utilization" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Allocated memory utilization in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Low memory commitment" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Low memory commitment in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Low memory utilization" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Low memory utilization in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Memory + swap commitment" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Memory + swap commitment in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Memory + swap utilization" auf "Template OpenVZ Node" erstellt.
Datenpunkt "Memory + swap utilization in %" auf "Template OpenVZ Node" erstellt.
Datenpunkt "RAM utilization" auf "Template OpenVZ Node" erstellt.
Datenpunkt "RAM utilization in %" auf "Template OpenVZ Node" erstellt.
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]
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 ('Discover OpenVZ container','0','','','3600','0','','','0','0','','0','','','','','0','','','','','',Array,'30','Discover OpenVZ container/\r\nScript /etc/zabbix/vzdiscover.sh','openvz.ct.discovery','','10108','1','4','0',NULL,'23762')] [Unknown column 'Array' in 'field list']
Fehler beim Ausführen der SQL-Anweisung "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 ('Discover OpenVZ container','0','','','3600','0','','','0','0','','0','','','','','0','','','','','',Array,'30','Discover OpenVZ container/\r\nScript /etc/zabbix/vzdiscover.sh','openvz.ct.discovery','','10108','1','4','0',NULL,'23762')".

@Lelik13a
Copy link
Owner

Lelik13a commented Aug 7, 2015

Seems like zabbix database version mismatch. What you zabbix version?. I am use 2.4.5. And this template must work on 2.2 too.

@qroac
Copy link
Author

qroac commented Aug 9, 2015

These are my versions:

$ dpkg -l  |grep zabbix
ii  zabbix-agent                          1:2.2.5-1+0.1                           armhf        network monitoring solution - agent
ii  zabbix-frontend-php                   1:2.2.5-1+0.1                           all          network monitoring solution - PHP front-end
ii  zabbix-server-mysql                   1:2.2.5-1+0.1                           armhf        network monitoring solution - server (using MySQL)

The errors before show, that the script tries to work with a string but has an array to work with.
Looking in the VALUES list of the statement I see Array in the values list. It is the position of the "filters" field.

@Lelik13a
Copy link
Owner

Seems like zabbix bug: https://support.zabbix.com/browse/ZBX-8192
I upload template without discovery rule, try import and create discovery manually:
Name: Discover OpenVZ container
Key: openvz.ct.discovery

Host prototypes:
Host name: {#CTID}
Visible name: {#CTHOST}

Groups: OpenVZ CT
Group prototypes: {#VENAME}

Linked templates: Template OpenVZ CT

discovery 1
discovery 2
discovery 3
discovery 4

@jangaraj
Copy link

jangaraj commented Oct 8, 2015

Note: Try to export template from Zabbix 2.2. It should be imported to Zabbix 2.4 without problem. I have had the same problem and now it's not a issue anymore.

@faustoroger
Copy link

On Zabbix 3.0, in the field Description, only change vzdiscover.sh to vzdiscover.pl.

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