# Unable to create component template updating component template results in invalid composable template after templates are merged

**URL:** https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271
**Category:** Logs
**Created:** [February 1, 2024, 10:08am UTC](https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271 "2024-02-01T10:08:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![florinsfetea](https://avatars.discourse-cdn.com/v4/letter/f/9fc29f/32.png) [@florinsfetea](https://discuss.elastic.co/u/florinsfetea)
#### Post date: [February 1, 2024, 10:08am UTC](https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271/1 "2024-02-01T10:08:42Z")

</div>

On 8.12.0 I am hitting this again

`  
Unable to create component template

updating component template [metrics-mysql.performance@custom] results in invalid composable template [metrics-mysql.performance] after templates are merged  
`

Before in [Upgrading component template logs-settings failed after update to 8.9 · Issue #98247 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/98247) it was the mapping of @timestamp field

Now there seems to be something else ☹

---

<div class="post-metadata">

### Author: ![nchaulet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nchaulet/32/77896_2.png) [@nchaulet](https://discuss.elastic.co/u/nchaulet)
#### Post date: [February 1, 2024, 9:10pm UTC](https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271/2 "2024-02-01T21:10:12Z")

</div>

Hi @florinsfetea

Do you think you could share your `metrics-mysql.performance@custom` template to help investigating this one?

---

<div class="post-metadata">

### Author: ![florinsfetea](https://avatars.discourse-cdn.com/v4/letter/f/9fc29f/32.png) [@florinsfetea](https://discuss.elastic.co/u/florinsfetea)
#### Post date: [February 2, 2024, 8:32am UTC](https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271/3 "2024-02-02T08:32:58Z")

</div>

```auto
{
  "index_templates": [
    {
      "name": "metrics-mysql.performance",
      "index_template": {
        "index_patterns": [
          "metrics-mysql.performance-*"
        ],
        "template": {
          "settings": {
            "index": {
              "mode": "time_series"
            }
          },
          "mappings": {
            "_meta": {
              "package": {
                "name": "mysql"
              },
              "managed_by": "fleet",
              "managed": true
            }
          }
        },
        "composed_of": [
          "metrics@tsdb-settings",
          "metrics-mysql.performance@package",
          "metrics-mysql.performance@custom",
          ".fleet_globals-1",
          ".fleet_agent_id_verification-1"
        ],
        "priority": 200,
        "_meta": {
          "package": {
            "name": "mysql"
          },
          "managed_by": "fleet",
          "managed": true
        },
        "data_stream": {
          "hidden": false,
          "allow_custom_routing": false
        }
      }
    }
  ]
}

{
  "component_templates": [
    {
      "name": "metrics-mysql.performance@package",
      "component_template": {
        "template": {
          "settings": {
            "index": {
              "lifecycle": {
                "name": "metrics"
              },
              "default_pipeline": "metrics-mysql.performance-1.17.0",
              "mapping": {
                "total_fields": {
                  "limit": "10000"
                }
              },
              "query": {
                "default_field": [
                  "ecs.version",
                  "service.address",
                  "service.type",
                  "agent.id",
                  "cloud.account.id",
                  "cloud.region",
                  "cloud.instance.id",
                  "cloud.provider",
                  "cloud.availability_zone",
                  "container.id",
                  "host.name",
                  "mysql.performance.events_statements.query_id",
                  "mysql.performance.table_io_waits.object.schema",
                  "mysql.performance.table_io_waits.object.name",
                  "mysql.performance.table_io_waits.index.name"
                ]
              }
            }
          },
          "mappings": {
            "_source": {
              "mode": "synthetic"
            },
            "properties": {
              "cloud": {
                "properties": {
                  "availability_zone": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  },
                  "instance": {
                    "properties": {
                      "id": {
                        "time_series_dimension": true,
                        "type": "keyword"
                      }
                    }
                  },
                  "provider": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  },
                  "region": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  },
                  "account": {
                    "properties": {
                      "id": {
                        "time_series_dimension": true,
                        "type": "keyword"
                      }
                    }
                  }
                }
              },
              "container": {
                "properties": {
                  "id": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  }
                }
              },
              "agent": {
                "properties": {
                  "id": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  }
                }
              },
              "@timestamp": {
                "ignore_malformed": false,
                "type": "date"
              },
              "ecs": {
                "properties": {
                  "version": {
                    "ignore_above": 1024,
                    "type": "keyword"
                  }
                }
              },
              "data_stream": {
                "properties": {
                  "namespace": {
                    "type": "constant_keyword"
                  },
                  "type": {
                    "type": "constant_keyword"
                  },
                  "dataset": {
                    "type": "constant_keyword"
                  }
                }
              },
              "service": {
                "properties": {
                  "address": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  },
                  "type": {
                    "ignore_above": 1024,
                    "type": "keyword"
                  }
                }
              },
              "host": {
                "properties": {
                  "name": {
                    "time_series_dimension": true,
                    "type": "keyword"
                  }
                }
              },
              "mysql": {
                "properties": {
                  "performance": {
                    "properties": {
                      "table_io_waits": {
                        "properties": {
                          "count": {
                            "properties": {
                              "fetch": {
                                "time_series_metric": "gauge",
                                "meta": {},
                                "type": "long"
                              }
                            }
                          },
                          "index": {
                            "properties": {
                              "name": {
                                "ignore_above": 1024,
                                "type": "keyword"
                              }
                            }
                          },
                          "object": {
                            "properties": {
                              "schema": {
                                "time_series_dimension": true,
                                "type": "keyword"
                              },
                              "name": {
                                "time_series_dimension": true,
                                "type": "keyword"
                              }
                            }
                          }
                        }
                      },
                      "events_statements": {
                        "properties": {
                          "avg": {
                            "properties": {
                              "timer": {
                                "properties": {
                                  "wait": {
                                    "time_series_metric": "gauge",
                                    "meta": {},
                                    "type": "long"
                                  }
                                }
                              }
                            }
                          },
                          "query_id": {
                            "time_series_dimension": true,
                            "type": "keyword"
                          },
                          "last": {
                            "properties": {
                              "seen": {
                                "type": "date"
                              }
                            }
                          },
                          "max": {
                            "properties": {
                              "timer": {
                                "properties": {
                                  "wait": {
                                    "time_series_metric": "gauge",
                                    "meta": {},
                                    "type": "long"
                                  }
                                }
                              }
                            }
                          },
                          "quantile": {
                            "properties": {
                              "95": {
                                "time_series_metric": "gauge",
                                "meta": {},
                                "type": "long"
                              }
                            }
                          },
                          "digest": {
                            "type": "flattened"
                          },
                          "count": {
                            "properties": {
                              "star": {
                                "time_series_metric": "gauge",
                                "meta": {},
                                "type": "long"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "_meta": {
          "package": {
            "name": "mysql"
          },
          "managed_by": "fleet",
          "managed": true
        }
      }
    }
  ]
}

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 1, 2024, 8:33am UTC](https://discuss.elastic.co/t/unable-to-create-component-template-updating-component-template-results-in-invalid-composable-template-after-templates-are-merged/352271/4 "2024-03-01T08:33:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
