Ad Widget

Collapse

error importing template zabbix 7.0 release

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sten
    Junior Member
    • Sep 2024
    • 4

    #1

    error importing template zabbix 7.0 release

    Hello everyone,
    I am trying to import some templates to our zabbix server 7.0. I got all the templates from the zabbix 7.0 release which are compatible with each other as mentioned. Yet I still errors with some templates, at the moment I am trying to import the MSSQL by ODBC template but it gives me an error in query.
    Click image for larger version

Name:	image.png
Views:	308
Size:	117.6 KB
ID:	491975
    What could be the cause of this issue and how do I proceed from here?
    thanks!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    This looks like SQL error.. Scroll to the end of that error and see whats wrong with the DB...

    Comment

    • sten
      Junior Member
      • Sep 2024
      • 4

      #3
      here is the entire error:
      • Error in query [INSERT INTO items (itemid,uuid,name,type,units,description,value_typ e,history,trends,status,discover,key_,hostid,value mapid,master_itemid,flags,params,query_fields,post s,headers) VALUES ('137060','9c9dab20d8fa46f888c6aa7c7c9bf1b9','MSSQ L DB \'{#DBNAME}\': Last diff backup duration','18','s','Duration of the last differential backup.','3','31d','365d','0','0','mssql.backup.di ff.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137061' ,'bd663e1e9b40469cb4ca430186b049db','MSSQL DB \'{#DBNAME}\': Last diff backup (time ago)','18','s','The amount of time since the last differential backup.','3','31d','365d','0','0','mssql.backup.di ff["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137062' ,'52929d988ad34aac945ff2ce9e448261','MSSQL DB \'{#DBNAME}\': Last full backup duration','18','s','Duration of the last full backup.','3','31d','365d','0','0','mssql.backup.fu ll.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137063' ,'06d0ac1eeca843a289defa1cf1d728a3','MSSQL DB \'{#DBNAME}\': Last full backup (time ago)','18','s','The amount of time since the last full backup.','3','31d','365d','0','0','mssql.backup.fu ll["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137064' ,'218241c7c5a648a59021999f97516349','MSSQL DB \'{#DBNAME}\': Last log backup duration','18','s','Duration of the last log backup.','3','31d','365d','0','0','mssql.backup.lo g.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137065' ,'c5e796bc904848efb2557c8a9a07b828','MSSQL DB \'{#DBNAME}\': Last log backup (time ago)','18','s','The amount of time since the last log backup.','3','31d','365d','0','0','mssql.backup.lo g["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137066' ,'52a2d8012fea467582b09505e9c880be','MSSQL DB \'{#DBNAME}\': Recovery model','18','','Recovery model selected:\r\n1 = Full\r\n2 = Bulk_logged\r\n3 = Simple','3','31d','365d','0','0','mssql.backup.rec overy_model["{#DBNAME}"]','11350','53','137035','2','','','',''),('137067' ,'f4f218f22d6d48419260003880b38abd','MSSQL DB \'{#DBNAME}\': Active transactions','18','','Number of active transactions for the database.','3','31d','365d','0','0','mssql.db.acti ve_transactions["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137068' ,'ff3916f807784639a1821229d4d722d8','MSSQL DB \'{#DBNAME}\': Data file size','18','B','Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of `tempdb`.','3','31d','365d','0','0','mssql.db.data _files_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137069' ,'0d7bdf4c18fa49e79926e6f6d078d50f','MSSQL DB \'{#DBNAME}\': Log bytes flushed per second','18','Bps','Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.','0','31d','365d','0','0','mssql.db.log_bytes _flushed_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137070' ,'85536311e68047a6a8bf13c51c8d0647','MSSQL DB \'{#DBNAME}\': Log file size','18','B','Cumulative size of all the transaction log files in the database.','3','31d','365d','0','0','mssql.db.log_ files_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137071' ,'75fd2f42e274471c97cb23dc740863b8','MSSQL DB \'{#DBNAME}\': Log file used size','18','B','Cumulative size of all the log files in the database.','3','31d','365d','0','0','mssql.db.log_ files_used_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137072' ,'c10b6f364aa547d8b4abe431ae27d70b','MSSQL DB \'{#DBNAME}\': Log flushes per second','18','','Number of log flushes per second.','0','31d','365d','0','0','mssql.db.log_fl ushes_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137073' ,'5404c8682b294a06a3027dc10d0b43fc','MSSQL DB \'{#DBNAME}\': Log flush waits per second','18','','Number of commits per second waiting for the log flush.','0','31d','365d','0','0','mssql.db.log_flu sh_waits_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137074' ,'f1abdb0800534f6bbf9f1403e7dea9e4','MSSQL DB \'{#DBNAME}\': Log flush wait time','18','ms','Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk.','0','31d','365d','0','0','mssql.db.log_flus h_wait_time["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137075' ,'fdb24058e54243e8b5a888ec40d506e9','MSSQL DB \'{#DBNAME}\': Log growths','18','','Total number of times the transaction log for the database has been expanded.','3','31d','365d','0','0','mssql.db.log_ growths["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137076' ,'a1a96d8bfef740ec9c8eadd9704ab605','MSSQL DB \'{#DBNAME}\': Log shrinks','18','','Total number of times the transaction log for the database has been shrunk.','3','31d','365d','0','0','mssql.db.log_sh rinks["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137077' ,'26d1515df1be450e861e4f7a9f76b03d','MSSQL DB \'{#DBNAME}\': Log truncations','18','','Number of times the transaction log has been shrunk.','3','31d','365d','0','0','mssql.db.log_tr uncations["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137078' ,'9f9cda56992841408ab8307b7019b76f','MSSQL DB \'{#DBNAME}\': Percent log used','18','%','Percentage of log space in use.','0','31d','365d','0','0','mssql.db.percent_l og_used["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137079' ,'fe7d7c3e0aab43d79c00eaceb39c8c6c','MSSQL DB \'{#DBNAME}\': State','18','','0 = Online\r\n1 = Restoring\r\n2 = Recovering | SQL Server 2008 and later\r\n3 = Recovery_pending | SQL Server 2008 and later\r\n4 = Suspect\r\n5 = Emergency | SQL Server 2008 and later\r\n6 = Offline | SQL Server 2008 and later\r\n7 = Copying | Azure SQL Database Active Geo-Replication\r\n10 = Offline_secondary | Azure SQL Database Active Geo-Replication','3','31d','365d','0','0','mssql.db.st ate["{#DBNAME}"]','11350','45','137036','2','','','',''),('137080' ,'267b1d54c40641f5aeb4e3e7adfa4680','MSSQL DB \'{#DBNAME}\': Transactions per second','18','','Number of transactions started for the database per second.','0','31d','365d','0','0','mssql.db.transa ctions_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137081' ,'4e1e21603b01420f9b25e85f5987e7ec','MSSQL Job \'{#JOBNAME}\': Enabled','18','','The possible values of the job status:\r\n0 = Disabled\r\n1 = Enabled','3','31d','365d','0','0','mssql.job.enabl ed["{#JOBNAME}"]','11350','38','137037','2','','','',''),('137082' ,'3ceba63a77e24628a2ee9439d574bac5','MSSQL Job \'{#JOBNAME}\': Last run date-time','18','unixtime','The last date-time of the job run.','3','31d','365d','0','0','mssql.job.lastrund atetime["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137083' ,'b9984c1238554a559b444853e9f66653','MSSQL Job \'{#JOBNAME}\': Last run status message','18','','An informational message about the last run of the job.','4','31d','0','0','0','mssql.job.lastrunstat usmessage["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137084' ,'1c725adad98f44158b43127d4c5fb0f3','MSSQL Job \'{#JOBNAME}\': Next run date-time','18','unixtime','The next date-time of the job run.','3','31d','365d','0','0','mssql.job.nextrund atetime["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137085' ,'eaa43a261e114979af236698ea7ae32c','MSSQL Job \'{#JOBNAME}\': Run status','18','','The possible values of the job status:\r\n0 ⇒ Failed\r\n1 ⇒ Succeeded\r\n2 ⇒ Retry\r\n3 ⇒ Canceled\r\n4 ⇒ Running','3','31d','365d','0','0','mssql.job.runst atus["{#JOBNAME}"]','11350','46','137037','2','','','',''),('137086' ,'69da58fe4c7e42028fa96388df526103','MSSQL Job \'{#JOBNAME}\': Run duration','18','s','Duration of the last-run job.','3','31d','365d','0','0','mssql.job.run_dura tion["{#JOBNAME}"]','11350',NULL,'137037','2','','','','')] [Incorrect string value: '\xE2\x87\x92 Fa...' for column `zabbix`.`items`.`description` at row 26] [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupImport->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createItemsWithDependency() → CItemPrototype->create() → CItemPrototype::createForce() → DB::insert() → DB::insertBatch() → DBexecute() → trigger_error() in include/db.inc.php:362]
      • SQL statement execution has failed "INSERT INTO items (itemid,uuid,name,type,units,description,value_typ e,history,trends,status,discover,key_,hostid,value mapid,master_itemid,flags,params,query_fields,post s,headers) VALUES ('137060','9c9dab20d8fa46f888c6aa7c7c9bf1b9','MSSQ L DB \'{#DBNAME}\': Last diff backup duration','18','s','Duration of the last differential backup.','3','31d','365d','0','0','mssql.backup.di ff.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137061' ,'bd663e1e9b40469cb4ca430186b049db','MSSQL DB \'{#DBNAME}\': Last diff backup (time ago)','18','s','The amount of time since the last differential backup.','3','31d','365d','0','0','mssql.backup.di ff["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137062' ,'52929d988ad34aac945ff2ce9e448261','MSSQL DB \'{#DBNAME}\': Last full backup duration','18','s','Duration of the last full backup.','3','31d','365d','0','0','mssql.backup.fu ll.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137063' ,'06d0ac1eeca843a289defa1cf1d728a3','MSSQL DB \'{#DBNAME}\': Last full backup (time ago)','18','s','The amount of time since the last full backup.','3','31d','365d','0','0','mssql.backup.fu ll["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137064' ,'218241c7c5a648a59021999f97516349','MSSQL DB \'{#DBNAME}\': Last log backup duration','18','s','Duration of the last log backup.','3','31d','365d','0','0','mssql.backup.lo g.duration["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137065' ,'c5e796bc904848efb2557c8a9a07b828','MSSQL DB \'{#DBNAME}\': Last log backup (time ago)','18','s','The amount of time since the last log backup.','3','31d','365d','0','0','mssql.backup.lo g["{#DBNAME}"]','11350',NULL,'137035','2','','','',''),('137066' ,'52a2d8012fea467582b09505e9c880be','MSSQL DB \'{#DBNAME}\': Recovery model','18','','Recovery model selected:\r\n1 = Full\r\n2 = Bulk_logged\r\n3 = Simple','3','31d','365d','0','0','mssql.backup.rec overy_model["{#DBNAME}"]','11350','53','137035','2','','','',''),('137067' ,'f4f218f22d6d48419260003880b38abd','MSSQL DB \'{#DBNAME}\': Active transactions','18','','Number of active transactions for the database.','3','31d','365d','0','0','mssql.db.acti ve_transactions["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137068' ,'ff3916f807784639a1821229d4d722d8','MSSQL DB \'{#DBNAME}\': Data file size','18','B','Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of `tempdb`.','3','31d','365d','0','0','mssql.db.data _files_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137069' ,'0d7bdf4c18fa49e79926e6f6d078d50f','MSSQL DB \'{#DBNAME}\': Log bytes flushed per second','18','Bps','Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.','0','31d','365d','0','0','mssql.db.log_bytes _flushed_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137070' ,'85536311e68047a6a8bf13c51c8d0647','MSSQL DB \'{#DBNAME}\': Log file size','18','B','Cumulative size of all the transaction log files in the database.','3','31d','365d','0','0','mssql.db.log_ files_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137071' ,'75fd2f42e274471c97cb23dc740863b8','MSSQL DB \'{#DBNAME}\': Log file used size','18','B','Cumulative size of all the log files in the database.','3','31d','365d','0','0','mssql.db.log_ files_used_size["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137072' ,'c10b6f364aa547d8b4abe431ae27d70b','MSSQL DB \'{#DBNAME}\': Log flushes per second','18','','Number of log flushes per second.','0','31d','365d','0','0','mssql.db.log_fl ushes_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137073' ,'5404c8682b294a06a3027dc10d0b43fc','MSSQL DB \'{#DBNAME}\': Log flush waits per second','18','','Number of commits per second waiting for the log flush.','0','31d','365d','0','0','mssql.db.log_flu sh_waits_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137074' ,'f1abdb0800534f6bbf9f1403e7dea9e4','MSSQL DB \'{#DBNAME}\': Log flush wait time','18','ms','Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk.','0','31d','365d','0','0','mssql.db.log_flus h_wait_time["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137075' ,'fdb24058e54243e8b5a888ec40d506e9','MSSQL DB \'{#DBNAME}\': Log growths','18','','Total number of times the transaction log for the database has been expanded.','3','31d','365d','0','0','mssql.db.log_ growths["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137076' ,'a1a96d8bfef740ec9c8eadd9704ab605','MSSQL DB \'{#DBNAME}\': Log shrinks','18','','Total number of times the transaction log for the database has been shrunk.','3','31d','365d','0','0','mssql.db.log_sh rinks["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137077' ,'26d1515df1be450e861e4f7a9f76b03d','MSSQL DB \'{#DBNAME}\': Log truncations','18','','Number of times the transaction log has been shrunk.','3','31d','365d','0','0','mssql.db.log_tr uncations["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137078' ,'9f9cda56992841408ab8307b7019b76f','MSSQL DB \'{#DBNAME}\': Percent log used','18','%','Percentage of log space in use.','0','31d','365d','0','0','mssql.db.percent_l og_used["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137079' ,'fe7d7c3e0aab43d79c00eaceb39c8c6c','MSSQL DB \'{#DBNAME}\': State','18','','0 = Online\r\n1 = Restoring\r\n2 = Recovering | SQL Server 2008 and later\r\n3 = Recovery_pending | SQL Server 2008 and later\r\n4 = Suspect\r\n5 = Emergency | SQL Server 2008 and later\r\n6 = Offline | SQL Server 2008 and later\r\n7 = Copying | Azure SQL Database Active Geo-Replication\r\n10 = Offline_secondary | Azure SQL Database Active Geo-Replication','3','31d','365d','0','0','mssql.db.st ate["{#DBNAME}"]','11350','45','137036','2','','','',''),('137080' ,'267b1d54c40641f5aeb4e3e7adfa4680','MSSQL DB \'{#DBNAME}\': Transactions per second','18','','Number of transactions started for the database per second.','0','31d','365d','0','0','mssql.db.transa ctions_sec.rate["{#DBNAME}"]','11350',NULL,'137036','2','','','',''),('137081' ,'4e1e21603b01420f9b25e85f5987e7ec','MSSQL Job \'{#JOBNAME}\': Enabled','18','','The possible values of the job status:\r\n0 = Disabled\r\n1 = Enabled','3','31d','365d','0','0','mssql.job.enabl ed["{#JOBNAME}"]','11350','38','137037','2','','','',''),('137082' ,'3ceba63a77e24628a2ee9439d574bac5','MSSQL Job \'{#JOBNAME}\': Last run date-time','18','unixtime','The last date-time of the job run.','3','31d','365d','0','0','mssql.job.lastrund atetime["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137083' ,'b9984c1238554a559b444853e9f66653','MSSQL Job \'{#JOBNAME}\': Last run status message','18','','An informational message about the last run of the job.','4','31d','0','0','0','mssql.job.lastrunstat usmessage["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137084' ,'1c725adad98f44158b43127d4c5fb0f3','MSSQL Job \'{#JOBNAME}\': Next run date-time','18','unixtime','The next date-time of the job run.','3','31d','365d','0','0','mssql.job.nextrund atetime["{#JOBNAME}"]','11350',NULL,'137037','2','','','',''),('137085' ,'eaa43a261e114979af236698ea7ae32c','MSSQL Job \'{#JOBNAME}\': Run status','18','','The possible values of the job status:\r\n0 ⇒ Failed\r\n1 ⇒ Succeeded\r\n2 ⇒ Retry\r\n3 ⇒ Canceled\r\n4 ⇒ Running','3','31d','365d','0','0','mssql.job.runst atus["{#JOBNAME}"]','11350','46','137037','2','','','',''),('137086' ,'69da58fe4c7e42028fa96388df526103','MSSQL Job \'{#JOBNAME}\': Run duration','18','s','Duration of the last-run job.','3','31d','365d','0','0','mssql.job.run_dura tion["{#JOBNAME}"]','11350',NULL,'137037','2','','','','')".

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I'm borrowing a favorite quote from Bjarne Stroustrup, but that error is "spectacularly long and unhelpful".

        Still, if you examine it carefully, you'll see that the critical part is this:
        Code:
        [Incorrect string value: '\xE2\x87\x92 Fa...' for column `zabbix`.`items`.`description` at row 26] [zabbix.php:17
        You're trying to import a template that uses a character from a character set that is not compatible with whatever character set you're using for the items.description column. Since it's the description column, you can find it in the template (errors suggests it might be on line 26 of the template, but I wouldn't necessarily trust that) and delete it. Still, you might want to make sure your items.description column is using the correct character set.

        Comment

        • sten
          Junior Member
          • Sep 2024
          • 4

          #5
          Hello,
          We only recently started working with zabbix so unfortunately I do not have the most knowledge about this subject, How can I make sure that you items.description column is using the correct charecter set?

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4806

            #6
            '\xE2\x87\x92' should translate to "⇒"

            But anyway.. this sounds like a charset issue as tim.mooney mentioned.

            Comment

            • tim.mooney
              Senior Member
              • Dec 2012
              • 1427

              #7
              Originally posted by sten
              Hello,
              We only recently started working with zabbix so unfortunately I do not have the most knowledge about this subject, How can I make sure that you items.description column is using the correct charecter set?
              If you are saying that you just recently installed Zabbix 7.0.x, then your database should be set up correctly, and your items table and the items.description column should have the correct character set and collation. Recent versions of Zabbix (6.0 and later) are much more precise about both character set and collation, and the front end will usually tell you if you have tables that are using the wrong character set. Having the wrong character set or collation is more commonly a problem for sites that have been using Zabbix for a long time. The original install may not have required appropriate settings, so it can cause problems when upgraded to recent versions.

              How you check it depends upon what backend database you are using... and you haven't told us anything about that.

              Comment

              Working...