pgprometheus

package
v0.0.0-...-de89388 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Client sends Prometheus samples to PostgreSQL

func NewClient

func NewClient(cfg *Config) *Client

NewClient creates a new PostgreSQL client

func (*Client) Close

func (c *Client) Close()

func (*Client) Collect

func (c *Client) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Client) Describe

func (c *Client) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*Client) HealthCheck

func (c *Client) HealthCheck() error

HealthCheck implements the healtcheck interface

func (Client) Name

func (c Client) Name() string

Name identifies the client as a PostgreSQL client.

func (*Client) Read

func (c *Client) Read(req *prompb.ReadRequest) (*prompb.ReadResponse, error)

Read implements the Reader interface and reads metrics samples from the database

func (*Client) ReadOnly

func (c *Client) ReadOnly() bool

func (*Client) Write

func (c *Client) Write(samples model.Samples) error

Write implements the Writer interface and writes metric samples to the database

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config for the database

func ParseFlags

func ParseFlags(cfg *Config) *Config

ParseFlags parses the configuration flags specific to PostgreSQL and TimescaleDB

Jump to

Keyboard shortcuts

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