a-schild / zabbix-ipsec

Zabbix template for monitoring Openswan and Strongswan IPSEC connections
24 stars 11 forks source link

Impossible to import the template on Zabbix 2.2 #1

Closed djamolsky closed 8 years ago

djamolsky commented 9 years ago

Hi Andre, I just started to have a look to the different ways to monitor ipsec connections and I found your project on github which interesting for me as we currently deploy connections based on StrongSwan. Many thanks for this (hard) work, unfortunately, I can't import your template on Zabbix. Before starting to troubleshoot, here are some details, maybe you have an idea: we use Zabbix 2.2.9 on CentOS 6 with mysql server. I did 2 tests:

Created: Application "IPSEC" on "Template App IPSEC VPN". Created: Item "OpenSWAN PLUTO process" on "Template App IPSEC VPN". 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,ipmisensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('IPSEC discovery','0','','','3600','0','','','0','0','','0','','50/1-7,00:00-24:00','','','0','','','','','',Array,'30','','ipsec.discover','','10200','1','4','0',NULL,'29839')] [Unknown column 'Array' in 'field list'] SQL statement execution has failed "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,ipmisensor,authtype,username,password,publickey,privatekey,port,filter,lifetime,description,key,trapper_hosts,hostid,flags,value_type,data_type,interfaceid,itemid) VALUES ('IPSEC discovery','0','','','3600','0','','','0','0','','0','','50/1-7,00:00-24:00','','','0','','','','','',Array,'30','','ipsec.discover','','10200','1','4','0',NULL,'29839')".

I am not familiar with the template creation/debugging yet so if you have any idea or need any other details or help to debug, really, do not hesitate to ask. Thanks a lot again and have a nice week end :)

a-schild commented 9 years ago

The problem is, that the template is Zabbix 2.4, looks like these templates can't be imported in older zabbix versions

I have attached some printscreens of the template "content", so you could recreate them in Zabbix 2.2. If you do so, please post back the 2.2 template, so I can provide it here too

configuration of graph prototypes_2015-05-26_10-56-29 configuration of item prototypes_2015-05-26_10-56-04 configuration of items_2015-05-26_10-55-24 configuration of trigger prototypes_2015-05-26_10-56-14 configuration of triggers_2015-05-26_10-55-38