magnify

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 7 Imported by: 0

README

Magnify 🔎

Simple tool to summarize & show prometheus metrics via JSON api

logo

About

Magnify is a simple tool to provide a JSON API based metrics resolution on top of Prometheus it heavily relies on Expr for metrics transformation.

Usage

Usage of magnify:
  -c string
        yaml file config path (default "config.yaml")

Example configuration

Please look at Expr documentation for expressions.

prometheus:
  addr: "http://localhost:4000"
expressions:
  - name: goroutines
    query: sum(rate(go_gc_duration_seconds{app_kubernetes_io_name="game-server"}[5m])) by (service)
    expr: "float(query_result[0].Value.String()) >= 0.0 ? 'operational': 'error'"
http:
  addr: ":9999"

Endpoints

Cache

Method: GET Path: /

Response:

{"goroutines": "operational"}
Key

Method: GET Path: /key/{name}

Response:

"operational"
Live & Ready endpoints

Method: GET Path: /health/live and /health/ready

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL