[SOLVED]Export / import of template on same version impossible

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 711
Joined: Wed Dec 07, 2011 9:19 am

[SOLVED]Export / import of template on same version impossible

Post by Rno »

I don't know what happen, import another time and it work!! But has to do 3 times!



Hello,
I made a device template on my production server, then I export it to import it on my test server.
Same Cacti version, but the import failed with this error:
30/03/2020 08:06:58 - 4 Import Error: Failed to insert into data_input_data table


So here is a devel debug and the one of the part with the error, and the template in attachment:

30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'graph_templates': 'a:3:{s:2:"id";s:2:"94";s:4:"hash";s:32:"342319185993fd4634cca227b046df77";s:4:"name";s:33:"ucd/net - TCP Current Established";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:1:"7";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:1:"8";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:1:"9";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"10";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"11";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"12";s:7:"t_value";s:2:"on";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"13";s:7:"t_value";s:2:"on";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"14";s:7:"t_value";s:2:"on";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"39";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"44";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"45";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_input_data': 'a:4:{s:21:"data_template_data_id";s:5:"10418";s:19:"data_input_field_id";s:2:"46";s:7:"t_value";s:0:"";s:5:"value";s:0:"";}'
30/03/2020 08:06:58 - 4 Import Error: Failed to insert into data_input_data table
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14748";s:4:"hash";s:32:"197bbe87b382e4d62e7d724a1eb3dc95";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:18:"ltmPServerTotConns";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"0";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"2";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14747";s:4:"hash";s:32:"2113467e1e1719a64270d1087a58e1f0";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:18:"ltmPServerBytesOut";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"0";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"2";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14746";s:4:"hash";s:32:"ce6adb75951fcf97cd0cdc5effc99c51";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:18:"ltmPServerCurConns";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"U";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"1";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14745";s:4:"hash";s:32:"6049070c5129238289ccc815d654d6c4";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:17:"ltmPServerPktsOut";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"0";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"2";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14744";s:4:"hash";s:32:"dbfcd14fe7b11495107f2ac916cda3eb";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:17:"ltmPServerBytesIn";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"0";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"2";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_rrd': 'a:15:{s:2:"id";s:5:"14743";s:4:"hash";s:32:"f54f471babebd7fbb067b0a6be227e23";s:16:"data_template_id";s:3:"243";s:18:"t_data_source_name";s:0:"";s:16:"data_source_name";s:16:"ltmPServerPktsIn";s:13:"t_rrd_minimum";s:0:"";s:11:"rrd_minimum";s:1:"0";s:13:"t_rrd_maximum";s:0:"";s:11:"rrd_maximum";s:1:"0";s:21:"t_data_source_type_id";s:0:"";s:19:"data_source_type_id";s:1:"2";s:15:"t_rrd_heartbeat";s:0:"";s:13:"rrd_heartbeat";i:120;s:21:"t_data_input_field_id";s:0:"";s:19:"data_input_field_id";s:1:"0";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template_data': 'a:10:{s:2:"id";s:5:"10418";s:16:"data_template_id";s:3:"243";s:22:"data_source_profile_id";i:3;s:6:"t_name";s:0:"";s:4:"name";s:62:"|host_description| - Pool Statistics - |query_ltmPoolStatName|";s:13:"data_input_id";s:1:"2";s:10:"t_rrd_step";s:0:"";s:8:"rrd_step";s:2:"60";s:8:"t_active";s:0:"";s:6:"active";s:2:"on";}'
30/03/2020 08:06:58 - DBCALL DEVEL: SQL Save on table 'data_template': 'a:3:{s:2:"id";s:3:"243";s:4:"hash";s:32:"3e3e96613f52b4731f60fb1fb70eedee";s:4:"name";s:45:"F5 BigIP - Pool Statistics (ltmPoolStatEntry)";}'
Attachments
cacti_host_template_f5_bigip.xml
(370.17 KiB) Downloaded 24 times
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [SOLVED]Export / import of template on same version impossible

Post by TheWitness »

How was this solved?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Rno
Cacti Pro User
Posts: 711
Joined: Wed Dec 07, 2011 9:19 am

Re: [SOLVED]Export / import of template on same version impossible

Post by Rno »

Sorry I can't even explain !!
i delete my template, export it again from the production server, and then import it again on the test one!

I know it's not very helpfull, but I was also working with a template based on cacti 0.8, Did import that one by mistake ?
Well maybe that will explain the issue since the database are not with the same structure.

Sorry !!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests