Node Native MetricsQL/PromQL Parser

node-metricsql

Native node binding for MetricsQL Parser

Build Module

make

Usage

const metricsql = require('node-metricsql');
const parsed = metricsql.parse(promql);

Test Module

node example.js 'sum(rate(foo{bar="baz"}[5m]))'
{
   "Name":"sum",
   "Args":[
      {
         "Name":"rate",
         "Args":[
            {
               "Expr":{
                  "LabelFilters":[
                     {
                        "IsNegative":false,
                        "IsRegexp":false,
                        "Label":"__name__",
                        "Value":"foo"
                     },
                     {
                        "IsNegative":false,
                        "IsRegexp":false,
                        "Label":"bar",
                        "Value":"baz"
                     }
                  ]
               },
               "Window":"5m",
               "Offset":"",
               "Step":"",
               "InheritStep":false
            }
         ]
      }
   ],
   "Modifier":{
      "Args":[
         "x",
         "y"
      ],
      "Op":"by"
   }
}

Todo

  • go binding
  • function mapping
  • format conversion
Owner
METRiCO
QXIP Metric & Timeseries Division
METRiCO
Similar Resources

Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.

A Go package for generating and manipulating UUIDs Generate, encode, and decode UUIDs v1, as defined in RFC 4122, in Go. Project Status v1.1.0 Stable:

Sep 27, 2022

Kademlia/Mainline DHT node in Go.

Kademlia/Mainline DHT node in Go.

This is a golang Kademlia/Bittorrent DHT library that implements BEP 5. It's typically used by a torrent client such as Taipei-Torrent, but it could a

Nov 30, 2022

A full node Bitcoin (BSV) implementation written in Go

bsvd bsvd is a full node Bitcoin (BSV) implementation written in Go (golang). This project is a port of the bchd codebase to Bitcoin (BSV). It provide

Dec 25, 2022

📦 Package Node.js applications into executable binaries 📦

caxa 📦 Package Node.js applications into executable binaries 📦 Support Recurring support on Patreon: https://patreon.com/leafac One-time support on

Jan 6, 2023

Examples of Golang compared to Node.js for learning

Examples of Golang compared to Node.js for learning

This guide full of examples is intended for people learning Go that are coming from Node.js, although the vice versa can work too. This is not meant to be a complete guide and it is assumed that you've gone through the Tour of Go tutorial. This guide is meant to be barely good enough to help you at a high level understand how to do X in Y and doing further learning on your own is of course required.

Jan 9, 2023

Prometheus exporter for Chia node metrics

chia_exporter Prometheus metric collector for Chia nodes, using the local RPC API Building and Running With the Go compiler tools installed: go build

Sep 19, 2022

CLI Tool to remove unwanted connections from your Chia Node based on Geo IP Location.

chia-bouncer Tiny CLI tool to remove unwanted connections from your Chia Node based on the Geo IP Location (Country). The Tool is written in golang an

Jun 25, 2021

HTTP API for a BitClout node

HTTP API for a BitClout node

BitClout is a blockchain built from the ground up to support a fully-featured social network. Its architecture is similar to Bitcoin, only it supports complex social network data like profiles, posts, follows, creator coin transactions, and more.

Dec 24, 2022

BitClout core node

BitClout core node

About BitClout BitClout is a blockchain built from the ground up to support a fully-featured social network. Its architecture is similar to Bitcoin, o

Dec 22, 2022

Node for providing data into Orakuru network

Orakuru's crystal-ball Node for providing data into Orakuru network. Configuration Crystal-ball uses environment variables and configuration files for

Jan 20, 2022

✨ Generate unique IDs (Port of Node package "generate-snowflake" to Golang)

✨ Generate Snowflake Generate unique IDs. Inspired by Twitter's Snowflake system. 📦 Installation Initialize your project (go mod init example.com/exa

Feb 11, 2022

Official Golang implementation of the Thinkium node

Go Thinkium Official Golang implementation of the Thinkium node. Building the source mkdir build docker run --rm -w /go/src/github.com/ThinkiumGroup/g

Nov 22, 2022

RSS3 distributed hosting node implemention.

RSS3 distributed hosting node implemention.

Dec 1, 2021

collection of tools to gleam insights from a full bitclout node's data

collection of tools to gleam insights from a full bitclout node's data

bitcloutscripts collection of tools to gleam insights from a full bitclout node's data bitcloutscripts $ ./bcs bcs posts # print all posts

Jul 11, 2021

Celer cBridge relay node implementation in Golang

cBridge Relay Node Official implementation of cBridge relay node in Golang. Prerequisites Prepare Machine To run a cBridge relay node, it is recommend

Sep 27, 2022

Reverse Proxy for geth node

Reverse Proxy for geth node

geth-proxy Reverse Proxy for geth node gcr.io/moonrhythm-containers/geth-proxy Features Health check base on last synced block timestamp Merge websock

Jul 26, 2022

CDN Node

CDN Node Init 生產環境伺服器請使用 Ctrl Server Output 的 install.sh 安裝 Dev go get github.com/gin-gonic/gin go get github.com/prometheus/common/log go get gopkg.i

Dec 20, 2021

nano-gpu-agent is a Kubernetes device plugin for GPU resources allocation on node.

nano-gpu-agent is a Kubernetes device plugin for GPU resources allocation on node.

Nano GPU Agent About this Project Nano GPU Agent is a Kubernetes device plugin implement for gpu allocation and use in container. It runs as a Daemons

Dec 29, 2022

The backend for a Symmetric node.

node-backend The backend for a Symmetric node. Contributing We have a contributing guide over here. Community You can contact us by joining our discor

Feb 18, 2022
Comments
  • unmashall failure

    unmashall failure

    The current conversion of GO*Expr structs to JSON is failing to convert values with complex queries, ie:

    node example.js 'histogram_quantile(0.9, sum(rate(traces_service_graph_request_server_seconds_bucket{server="api"}[1m])) by (le, client, server))'
    

    Short queries in the examples works:

    node example.js `sum(rate(foo{bar="baz"}[5m])) by (job)`
    
A proxy that authorizes and enforces a given label in a given PromQL query

prom-authzed-proxy prom-authzed-proxy is a proxy for Prometheus that authorizes the request's Bearer Token with Authzed and enforces a label in a Prom

Jul 19, 2022
PromQL Prettier

PromQL Prettier Have trouble in reading PromQL written by your colleagues or SRE team? promql-prettier to the rescue! Thanks for WebAssembly, you can

Sep 5, 2022
Transform PromQL Expressions on the fly

promql-transform Transforms PromQL expressions on the fly Usage Given the expression job:request_latency_seconds:mean5m{job=\"myjob\"} > 0.5 Running

Jun 21, 2022
network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.
network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.

Network Node Manager network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of ku

Dec 18, 2022
Golang-for-node-devs - Golang for Node.js developers

Golang for Node.js developers Who is this video for? Familiar with Node.js and i

Dec 7, 2022
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.

omniparser Omniparser is a native Golang ETL parser that ingests input data of various formats (CSV, txt, fixed length/width, XML, EDI/X12/EDIFACT, JS

Jan 4, 2023
grobotstxt is a native Go port of Google's robots.txt parser and matcher library.

grobotstxt grobotstxt is a native Go port of Google's robots.txt parser and matcher C++ library. Direct function-for-function conversion/port Preserve

Dec 27, 2022
Native LogQL Parser & Processor
Native LogQL Parser & Processor

node-logql Native node binding for LogQL Build Module make Install npm install -g node-logql Usage See example.js for a full query example const logq

Jan 27, 2022
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
A node.js version management utility for Windows. Ironically written in Go.
A node.js version management utility for Windows. Ironically written in Go.

The npm/Microsoft/Google recommended Node.js version manager for Windows. This is not the same thing as nvm. The original nvm is a completely separate

Jan 2, 2023