Documentation ¶
Overview ¶
Package grafana provides facilities for working with Grafana.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthServer ¶
type AuthServer struct {
// contains filtered or unexported fields
}
AuthServer authenticates incoming requests via Grafana API.
func NewAuthServer ¶
func NewAuthServer(c *Client) *AuthServer
NewAuthServer creates new AuthServer.
func (*AuthServer) ServeHTTP ¶
func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP serves internal location /auth_request.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client for Grafana API.
func (*Client) Collect ¶
func (c *Client) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Client) CreateAnnotation ¶
CreateAnnotation creates annotation with given text and tags ("pmm_annotation" is added automatically) and returns Grafana's response text which is typically "Annotation added" or "Failed to save annotation".
func (*Client) Describe ¶
func (c *Client) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
Click to show internal directories.
Click to hide internal directories.