{"id":25563751,"url":"https://github.com/agentkube/txt2promql","last_synced_at":"2026-04-28T21:32:17.989Z","repository":{"id":277154221,"uuid":"922037382","full_name":"agentkube/txt2promql","owner":"agentkube","description":"Go library for text-to-PromQL conversion. (In Progress) - ⚠️  Affected due to MCP launch","archived":false,"fork":false,"pushed_at":"2025-02-14T07:17:10.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-01T07:15:28.153Z","etag":null,"topics":["go","nlp","openai","promql","text2promql","txt2promql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentkube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-25T06:28:07.000Z","updated_at":"2025-04-06T14:57:15.000Z","dependencies_parsed_at":"2025-02-12T12:52:50.202Z","dependency_job_id":"f5d30592-7337-4ead-94f5-82c401fec2f7","html_url":"https://github.com/agentkube/txt2promql","commit_stats":null,"previous_names":["agentkube/txt2promql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agentkube/txt2promql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentkube%2Ftxt2promql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentkube%2Ftxt2promql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentkube%2Ftxt2promql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentkube%2Ftxt2promql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentkube","download_url":"https://codeload.github.com/agentkube/txt2promql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentkube%2Ftxt2promql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","nlp","openai","promql","text2promql","txt2promql"],"created_at":"2025-02-20T20:27:32.135Z","updated_at":"2026-04-28T21:32:17.971Z","avatar_url":"https://github.com/agentkube.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Agent Kube Thumbnail](https://github.com/user-attachments/assets/d50bad8f-fd3e-4869-9520-8c94b9954a48)\n\n# Txt2PromQL\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Go Report Card](https://goreportcard.com/badge/github.com/agentkube/txt2promql)](https://goreportcard.com/report/github.com/agentkube/txt2promql)\n[![Build Status](https://github.com/agentkube/txt2promql/actions/workflows/publish.yaml/badge.svg)](https://github.com/agentkube/txt2promql/actions)\n\nConvert natural language queries to PromQL with AI-powered understanding. Designed for monitoring democratization and observability workflows.\n\n\n| 🚧 **Project Status: Beta** 🚧 |  \n|---------------------------------------------|  \n| :loudspeaker: **txt2promql is actively evolving with community contributions. While maintainers provide guidance, the project relies on user feedback and improvements.** Feel free to [open a discussion](#) for questions or suggestions. \u003cbr/\u003e\u003cbr/\u003e⚠ **txt2promql is currently in beta.** It is still under active development and testing, meaning it may have incomplete features, occasional bugs, or missing documentation. We do not yet recommend it for production use and provide it as-is without official support. \u003cbr/\u003e\u003cbr/\u003e:bulb: If you require a production-ready solution, consider exploring commercial alternatives or contributing to enhance the project's stability. |\n\n\n\n\u003c!-- **Demo** (insert animated GIF here showing CLI and web interface) --\u003e\n\n## Features\n\n- **Natural Language Interface**: Convert plain English to production-ready PromQL\n- **Knowledge Graph Integration**: Understands metric relationships and monitoring best practices\n- **Hybrid AI Approach**: Combines LLM capabilities with rule-based validation\n- **Multi-Interface Support**:\n  - REST API\n  - Command Line Interface (CLI)\n- **Prometheus Native**:\n  - Auto schema discovery\n  - Query validation\n  - Built-in connection management\n\n## Installation\n\n### From Source\n\n```bash\ngo install github.com/agentkube/txt2promql@latest\n```\n\n###  PromQL queries scenarios\n\n\n| **Category**                  | **Question**                                                                                                                                           |\n|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Node Resources**            | Write PromQL statements to query the CPU utilization of each Kubernetes node.                                                                          |\n|                               | Write PromQL statements to query the memory usage of the following Kubernetes node: `172.16.xx.xx:9100`.                                               |\n|                               | Write PromQL statements to trigger alerts if a node becomes abnormal in the current cluster.                                                           |\n|                               | Write PromQL statements to query abnormal nodes.                                                                                                      |\n| **Pod Resources**             | Write PromQL statements to trigger alerts if a pod is restarted more than twice within 5 minutes.                                                     |\n|                               | Write PromQL statements to query the availability of the following pod: `namespace=\"arms\", deployment=\"arms-pop-malaysia\"`.                             |\n|                               | Write PromQL statements to query the pod that has the most exceptions in a Kubernetes cluster.                                                         |\n|                               | Write PromQL statements to query the failed jobs.                                                                                                     |\n| **Container Resources**       | Write PromQL statements to query the container with the highest CPU utilization in the default namespace.                                              |\n|                               | Write PromQL statements to query the memory usage of each container in the following namespace and pod: `namespace=\"default\", pod_name=\"arms-xtrace\"`.  |\n|                               | Write PromQL statements to query the top five containers with the highest memory usage.                                                                |\n| **Lingjun Dashboard Metrics** | Write PromQL statements to query the GPU utilization of each node on the Lingjun dashboard.                                                            |\n|                               | Write PromQL statements to query the GPU utilization of each cluster on the Lingjun dashboard.                                                         |\n| **Average Response Time**     | Write PromQL statements to query the average response time of each API operation.                                                                      |\n|                               | Write PromQL statements to query the average response time of each API operation in Application A.                                                     |\n|                               | Write PromQL statements to query the top 10 API operations with the longest average response time in Application A.                                     |\n|                               | Write PromQL statements to query the top 10 applications with the longest average response time.                                                       |\n| **Error Rates**               | Write PromQL statements to query the error rate of each API operation in Application A in the previous minute.                                         |\n|                               | Write PromQL statements to query the top 10 applications with the highest error rate in ARMS.                                                          |\n|                               | Write PromQL statements to query the top 10 API operations with the highest error rate in Application A.                                               |\n|                               | Write PromQL statements to query the top five API operations with the highest error rate on the machine (`IP: 195.128.xx.xx`) of Application A in the previous 2 hours. |\n| **Number of Calls**           | Write PromQL statements to query the queries per second (QPS) of a Redis database.                                                                    |\n|                               | Write PromQL statements to query the QPS of the Dubbo service.                                                                                        |\n|                               | Write PromQL statements to query the QPS of each API operation in Application A.                                                                       |\n|                               | Write PromQL statements to query the number of API calls for each application in the previous hour and group the calls by machine.                     |\n|                               | Write PromQL statements to query the number of calls to each API operation of Application A in the previous 5 minutes in ARMS.                         |\n|                               | Write PromQL statements to query the number of calls to the API operations with the `payment/coupon` tag in Application A in the previous 5 minutes.    |\n|                               | Write PromQL statements to query the top 10 API operations with the largest number of calls.                                                           |\n|                               | Write PromQL statements to query the top five API operations with the largest number of calls in Application A.                                        |\n| **Number of Errors**          | Write PromQL statements to query the number of errors for each API operation in the previous 5 minutes.                                               |\n|                               | Write PromQL statements to query the total number of HTTP request errors on the machine whose IP address is `10.26.xx.xx` in the previous 5 minutes.   |\n|                               | Write PromQL statements to query the API operation with the largest number of errors in the previous hour.                                             |\n|                               | Write PromQL statements to query the total number of call errors that occurred on the machine (`IP: 10.26.xx.xx`) and on which the ClothService service is deployed in the previous 10 minutes. |\n| **Slow SQL Queries**          | Write PromQL statements to query the slow SQL queries generated in the previous 10 minutes.                                                           |\n|                               | Write PromQL statements to query the API operation that causes the largest number of slow SQL queries in Application A in the previous 10 minutes.     |\n|                               | Write PromQL statements to query the top 10 API operations that cause the largest number of slow SQL queries in Application A.                         |\n|                               | Write PromQL statements to query the slow SQL queries generated in the previous hour.                                                                 |\n| **Database Metrics**          | Write PromQL statements to query the API operations that failed to be called on a Redis database in the previous minute.                               |\n|                               | Write PromQL statements to query the top five API operations that failed to be called on a MySQL database in the previous minute.                      |\n| **HTTP Status Codes**         | Write PromQL statements to count the number of 4xx or 5xx errors.                                                                                     |\n|                               | Write PromQL statements to count the number of 400 and 500 errors.                                                                                    |\n|                               | Write PromQL statements to query the number of requests for which 4xx is returned for Application A.                                                   |\n| **Full Garbage Collections**  | Write PromQL statements to query the number of full GCs occurred in the previous day.                                                                 |\n|                               | Write PromQL statements to query the number of full GCs occurred on each machine in the previous hour.                                                 |\n|                               | Write PromQL statements to query the machines on which full GCs occurred in Application A.                                                            |\n|                               | Write PromQL statements to query the machines on which full GCs occurred more than five times.                                                         |\n| **GC Time Consumption**       | Write PromQL statements to query the amount of time consumed by full GCs on each machine.                                                             |\n|                               | Write PromQL statements to query the top five machines on which full GCs consume the largest amount of time.                                           |\n|                               | Write PromQL statements to query the services in which full GCs consume more than 1 second.                                                           |\n| **QPS Increase**              | Write PromQL statements to query the applications whose number of access requests increases within 10 minutes.                                         |\n|                               | Write PromQL statements to query the application whose number of access requests most increases in the previous day.                                   |\n|                               | Write PromQL statements to query the API operation whose number of access requests most rapidly increases in Application A in the previous week.       |\n| **Incremental Metrics**       | Write PromQL statements to monitor the `arms_mysql_requests_error_count` metric and send an alert if the metric value suddenly increases.              |\n|                               | Write PromQL statements to monitor the increment of the `jvm_threads_live_threads` metric.                                                             |\n| **ARMS Console Metrics**      | Write PromQL statements to check whether the number of errors increases or decreases compared with that of yesterday.                                  |\n|                               | Write PromQL statements to query the number of requests that increases or decreases compared with that of the previous hour.                           |\n|                               | Write PromQL statements to check whether the number of exceptions increases or decreases compared with that of yesterday.                              |\n|                               | Write PromQL statements to check whether the average amount of time consumed by applications increases or decreases compared with that of the previous hour. |\n|                               | Write PromQL statements to query the increased or decreased average amount of time consumed by applications.                                           |\n|                               | Write PromQL statements to query the applications that are affected by full GCs.                                                                      |\n|                               | Write PromQL statements to query the API operations that are affected by full GCs.                                                                    |\n|                               | Write PromQL statements to query the applications that involve slow SQL queries.                                                                      |\n|                               | Write PromQL statements to query the API operations that cause slow SQL queries.                                                                      |\n|                               | Write PromQL statements to query the applications whose number of errors increases.                                                                   |\n|                               | Write PromQL statements to query the machines whose number of errors increases.                                                                       |\n|                               | Write PromQL statements to query the API operations whose number of errors increases in Application A.                                                |\n| **CPU Utilization**           | Write PromQL statements to query the CPU utilization of each machine.                                                                                 |\n|                               | Write PromQL statements to query the top five machines with the highest CPU utilization in the previous 5 minutes.                                     |\n|                               | Write PromQL statements to query the machines whose CPU utilization exceeds 70% in Application A in the previous 5 minutes.                           |\n|                               | Write PromQL statements to query the top five machines whose CPU utilization most rapidly increases in the previous 5 minutes and list the CPU utilization. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentkube%2Ftxt2promql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentkube%2Ftxt2promql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentkube%2Ftxt2promql/lists"}