Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Rows []struct { Panels []PanelConfig `json:"panels"` Repeat string `json:"repeat"` Title string `json:"title"` } `json:"rows"` Templating struct { List []struct { Name string `json:"name"` Label string `json:"label"` Query string `json:"query"` } `json:"list"` } `json:"templating"` }
Config is the Prometheus metrics config for the Grafana, We will parse the associated json file to this Config.
func ParseConfig ¶
ParseConfig parses the config from a JSON file.
func (*Config) LabelValues ¶
func (c *Config) LabelValues() []LabelValue
LabelValues parse the templating to get the label values.
type LabelValue ¶
LabelValue is used to get thet time series with the centain label. We will use this label value to replace the name configured in Grafana.
type PanelConfig ¶
type PanelConfig struct { Targets []struct { Expr string `json:"expr"` LegendFormat string `json:"legendFormat"` } Title string `json:"title"` }
PanelConfig is for panel of the row.
Click to show internal directories.
Click to hide internal directories.