a Prometheus go client (SDK), a simple Prometheus HTTP API wrapper.
- Query
- QueryRange
- QuerySeries
- QueryLabels
- QueryLabelValues
- QueryTargets
- QueryRules
- QueryAlerts
- QueryTargetMetadata
- QueryMetricMetadata
- QueryAlertManagers
- QueryStatusConfig
- QueryStatusFlags
- QueryStatusRuntimeInfo
- QueryStatusBuildInfo
- QueryStatusTSDB
- TSDB Admin APIs
go get github.com/zhangjie2012/promclient-go
import promclient "github.com/zhangjie2012/promclient-go"
c = promclient.NewClient(PrometheusUrl, 0)
c.Query("up", float64(time.Now().Unix()))