Duansg opened a new pull request, #3889: URL: https://github.com/apache/hertzbeat/pull/3889
## What's changed? ### Background 1. During the main branch regression process, I discovered that the presence of the `instance` tag in metrics triggers conflicts, thereby affecting the write logic. The specific exception is as follows: ``` 2025-12-04 22:45:28 [warehouse-persistent-data-storage] ERROR org.apache.hertzbeat.warehouse.store.history.tsdb.greptime.GreptimeDbDataStorage - [warehouse greptime]--Error occurred: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Duplicated column name in gRPC requests, name: instance ``` <img width="1489" height="512" alt="error_instance" src="https://github.com/user-attachments/assets/b22aa9e2-a5f1-4c41-b4c2-39f677bcc4f0" /> 2. The main branch currently contains the `instance` templates `app-influxdb_promql.yml` and `app-kafka_promql.yml`. ### Modification details: 1. Code structure optimization and removal of redundant code. 2. Added the hzb internal keyword mapping enumeration and validation utility class, along with test cases. 3. Modify all monitoring template information and add validation logic to new/modified templates. ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [ ] I have written the necessary doc or comment. - [x] I have added the necessary unit tests and all cases have passed. ## Add or update API - [ ] I have added the necessary [e2e tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have passed. ### After improvement > Chart Detail <img width="1495" height="561" alt="success_instance" src="https://github.com/user-attachments/assets/159ef6f5-3e91-431f-bb26-659d7ebdfb22" /> > Template Validation <img width="1511" height="582" alt="Snipaste_2025-12-05_15-01-25" src="https://github.com/user-attachments/assets/8cc0e825-e65b-4f21-803f-bc60b8b5cd22" /> > Threshold <img width="1506" height="625" alt="Snipaste_2025-12-05_20-12-31" src="https://github.com/user-attachments/assets/2088d213-dba0-42de-8e62-873d7cb1f468" /> > Alarms <img width="1508" height="769" alt="Snipaste_2025-12-05_20-13-17" src="https://github.com/user-attachments/assets/f1057d74-42ea-47b5-b317-24c3e1302716" /> > InfluxDB Monitor <img width="1501" height="820" alt="influxDB" src="https://github.com/user-attachments/assets/de6d53a1-a4e0-4cf6-8513-01710365798e" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
