Skip to content
castaiPublic

About

Prometheus Remote Write Go client

Topics

Resources

Stars

55 stars

Watchers

2 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

promwrite

Prometheus Remote Write Go client with minimal dependencies. Supports Prometheus, Cortex, VictoriaMetrics etc.

Install

go get github.com/castai/promwrite

Example Usage

client := promwrite.NewClient("http://prometheus:8428/api/v1/write")
resp, err := client.Write(context.Background(), &promwrite.WriteRequest{
	TimeSeries: []promwrite.TimeSeries{
		{
			Labels: []promwrite.Label{
				{
					Name:  "__name__",
					Value: "my_metric_name",
				},
			},
			Sample: promwrite.Sample{
				Time:  time.Now(),
				Value: 123,
			},
		},
	},
})

About

Prometheus Remote Write Go client

Topics

Resources

Stars

55 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages