q1x / zabbix-templates-30

Optimized templates for use with Zabbix 3.0.x
14 stars 6 forks source link

failed to import t_duty_app_db_mysql #1

Open The-Sec opened 7 years ago

The-Sec commented 7 years ago

When trying to import t_duty_app_db_mysql, we are confronted with a MYSQL error as follows.

Error in query [INSERT INTO applications (name,hostid,applicationid) VALUES ('MYSQL::Metadata','10122','491'),('MYSQL::Metrics','10122','492')] [Duplicate entry '10122-MYSQL::Metadata' for key 'applications_2'] SQL statement execution has failed "INSERT INTO applications (name,hostid,applicationid) VALUES ('MYSQL::Metadata','10122','491'),('MYSQL::Metrics','10122','492')".

The-Sec commented 7 years ago

t_duty_app_db_mysql, depends on the following three templates

  1. t_task_app_db_mysql
  2. t_task_app_db_mysql_perf
  3. t_task_service_mysql

Template 1 and 2 define the applications as "Mysql" where template 3 defines it as "MYSQL". When you rename the already imported template or change the application name with in template t_task_service_mysql to "Mysql" and reimport. you should be able to import t_duty_app_db_mysql successfully. #

The-Sec commented 7 years ago

Use pull to fix the issue with the master repo.