 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package test will scrape a target and you can inspect the variables. Basic usage:
result := Scrape("http://localhost:9153/metrics")
v := MetricValue("coredns_cache_capacity", result)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricValue ¶
func MetricValue(name string, mfs []*MetricFamily) (string, map[string]string)
MetricValue returns the value associated with name as a string as well as the labels. It only returns the first metrics of the slice.
func MetricValueLabel ¶
func MetricValueLabel(name, label string, mfs []*MetricFamily) (string, map[string]string)
MetricValueLabel returns the value for name *and* label *value*.
Types ¶
type MetricFamily ¶
type MetricFamily struct {
	Name    string        `json:"name"`
	Help    string        `json:"help"`
	Type    string        `json:"type"`
	Metrics []interface{} `json:"metrics,omitempty"` // Either metric or summary.
}
    MetricFamily holds a prometheus metric.
 Click to show internal directories. 
   Click to hide internal directories.