promplot

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package promplot provides tools for fetching, plotting and sharing Prometheus metrics data. This tools are used by the promplot binary but can also be independently use by other Go programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metrics

func Metrics(server, query string, queryTime time.Time, duration, step time.Duration) (model.Matrix, error)

Metrics fetches data from Prometheus.

func Plot

func Plot(metrics model.Matrix, title, format string) (io.WriterTo, error)

Plot creates a plot from metric data and saves it to a temporary file. It's the callers responsibility to remove the returned file when no longer needed.

func Slack

func Slack(token, channel, title string, plot io.WriterTo) error

Slack posts a file to a Slack channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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