{"id":18732462,"url":"https://github.com/metrico/node-metricsql","last_synced_at":"2025-04-12T18:31:13.795Z","repository":{"id":54341085,"uuid":"435182738","full_name":"metrico/node-metricsql","owner":"metrico","description":"Node Native MetricsQL/PromQL Parser","archived":false,"fork":false,"pushed_at":"2022-08-06T17:37:36.000Z","size":9251,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T12:51:10.820Z","etag":null,"topics":["golang","metricsql","native-module","nodejs","parser","promql"],"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/metrico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-05T14:01:44.000Z","updated_at":"2024-02-16T02:52:25.000Z","dependencies_parsed_at":"2022-08-13T12:31:17.236Z","dependency_job_id":null,"html_url":"https://github.com/metrico/node-metricsql","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fnode-metricsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fnode-metricsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fnode-metricsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrico%2Fnode-metricsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrico","download_url":"https://codeload.github.com/metrico/node-metricsql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613317,"owners_count":21133491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","metricsql","native-module","nodejs","parser","promql"],"created_at":"2024-11-07T15:06:11.060Z","updated_at":"2025-04-12T18:31:12.585Z","avatar_url":"https://github.com/metrico.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/1423657/144750632-c129d650-a898-4436-a65a-a5d4519c42d1.png\" width=100 /\u003e\n\n# node-metricsql\n\n\u003e Native node binding for [MetricsQL Parser](https://github.com/VictoriaMetrics/metricsql)\n\n\n### Build Module\n```console\nmake\n```\n\n### Usage\n```javascript\nconst metricsql = require('node-metricsql');\nconst parsed = metricsql.parse(promql);\n```\n\n### Test Module\n```console\nnode example.js 'sum(rate(foo{bar=\"baz\"}[5m])) by (x,y)'\n```\n```json\n{\n   \"Name\":\"sum\",\n   \"Args\":[\n      {\n         \"Name\":\"rate\",\n         \"Args\":[\n            {\n               \"Expr\":{\n                  \"LabelFilters\":[\n                     {\n                        \"IsNegative\":false,\n                        \"IsRegexp\":false,\n                        \"Label\":\"__name__\",\n                        \"Value\":\"foo\"\n                     },\n                     {\n                        \"IsNegative\":false,\n                        \"IsRegexp\":false,\n                        \"Label\":\"bar\",\n                        \"Value\":\"baz\"\n                     }\n                  ]\n               },\n               \"Window\":\"5m\",\n               \"Offset\":\"\",\n               \"Step\":\"\",\n               \"InheritStep\":false\n            }\n         ]\n      }\n   ],\n   \"Modifier\":{\n      \"Args\":[\n         \"x\",\n         \"y\"\n      ],\n      \"Op\":\"by\"\n   }\n}\n```\n\n#### Todo\n- [x] go binding\n- [x] function mapping\n- [x] format conversion\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fnode-metricsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrico%2Fnode-metricsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrico%2Fnode-metricsql/lists"}