Documentation ¶
Index ¶
- Constants
- type Prometheus
- func (prom *Prometheus) ExecPrometheusMultipleQuery(queries map[string]string, promApi promv1.API, startDate time.Time, ...) (map[string]map[string]map[string]float64, error)
- func (prom *Prometheus) ExecPrometheusQuery(promQuery string) ([][]string, error)
- func (prom *Prometheus) FindPrometheusOCPRoute(namespaceIn string, routeIn string) (string, error)
- func (prom *Prometheus) FindPrometheusOCPSAToken(namespaceIn string, saIn string) (string, error)
- func (prom *Prometheus) GetPrometheusConnection(insecure bool) (promv1.API, error)
- func (prom *Prometheus) QueryParseModelMetric(queryName string, sample *model.SampleStream, metricKey string) (string, float64, float64, float64, float64, float64, float64, int, error)
- func (prom *Prometheus) SetPrometheusOCP() error
- type PrometheusResponse
Constants ¶
View Source
const ( // GroupAPI is the group API scope use in this package GroupAPI = "sxlibs.k8s.startx.fr" // GroupName is the group name use in this package GroupName = "prometheus" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prometheus ¶
Prometheus structure
func NewPrometheus ¶
func NewPrometheus(kclient *sxKCli.K8sClient) *Prometheus
Initialize a kubeconfig object ex:
kubeconfig := kc.NewPrometheus()
func (*Prometheus) ExecPrometheusMultipleQuery ¶
func (*Prometheus) ExecPrometheusQuery ¶
func (prom *Prometheus) ExecPrometheusQuery(promQuery string) ([][]string, error)
Find informations about OpenShift Prometheus
func (*Prometheus) FindPrometheusOCPRoute ¶
func (prom *Prometheus) FindPrometheusOCPRoute(namespaceIn string, routeIn string) (string, error)
Get the prometheus route URL
func (*Prometheus) FindPrometheusOCPSAToken ¶
func (prom *Prometheus) FindPrometheusOCPSAToken(namespaceIn string, saIn string) (string, error)
Get the prometheus SA token located into the given namespace and according to the given ServiceAccount name
func (*Prometheus) GetPrometheusConnection ¶
func (prom *Prometheus) GetPrometheusConnection(insecure bool) (promv1.API, error)
Prepare the connection to Prometheus
func (*Prometheus) QueryParseModelMetric ¶
func (*Prometheus) SetPrometheusOCP ¶
func (prom *Prometheus) SetPrometheusOCP() error
Find connection details about OpenShift Prometheus
type PrometheusResponse ¶
Click to show internal directories.
Click to hide internal directories.