prometheus_query_range

command module
v0.0.0-...-209004c Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

prometheus_query_range
======================
Prometheus API doesn't give a direct way to get all the metrics for a particular time
range. So, here's `prometheus_query_range` for you!

Installation
============
    $ go get -u github.com/shmsr/prometheus_query_range/...
(or)
    $ git clone https://github.com/shmsr/prometheus_query_range.git
    $ cd prometheus_query_range/
    $ go build

Note: `go get` will place the build at `$GOPATH/bin`

Usage
=====
    $ ./prometheus_query_range --addr="<address-to-prometheus-server>" --start_time="2020-10-28T20:10:30Z" --end_time="2020-11-04T20:11:00Z" --step=10

Note: The `--start_time` and `--end_time` accepts `RFC3339` time format.

Help
====
    $ ./prometheus_query_range --help

Usage of ./prometheus_query_range:
  -addr string
    	address
  -end_time string
    	end time (current_time) (default "2020-11-10T20:06:34+05:30")
  -start_time string
    	start time (current_time - 24h) (default "2020-11-09T20:06:34+05:30")
  -step string
    	step period (in minutes) (default "10")

Documentation

Overview

All error(s) and warning(s) are directed to stderr Only results are directed to stdout

Jump to

Keyboard shortcuts

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