bcsmonitor

package
v0.0.0-...-c91c74a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package bcsmonitor monitor query

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFirstValue

func GetFirstValue(vector model.Vector) string

GetFirstValue 获取第一个值

func GetLabelSet

func GetLabelSet(vector model.Vector) map[string]string

GetLabelSet 获取第一个值的labels

func QueryInstant

func QueryInstant(ctx context.Context, projectId string, promql string, params map[string]interface{},
	t time.Time) (*promclient.Result, error)

QueryInstant 查询实时数据, 带格式化

func QueryInstantVector

func QueryInstantVector(ctx context.Context, projectId string, promql string, params map[string]interface{},
	t time.Time) (model.Vector, []string, error)

QueryInstantVector 查询实时数据, 带格式化

func QueryLabelSet

func QueryLabelSet(ctx context.Context, projectId string, promql string, params map[string]interface{},
	t time.Time) (map[string]string, error)

QueryLabelSet 查询

func QueryMultiValues

func QueryMultiValues(ctx context.Context, projectId string, promqlMap map[string]string, params map[string]interface{},
	t time.Time) (map[string]string, error)

QueryMultiValues 查询第一个值 format 格式 %<var>s

func QueryRange

func QueryRange(ctx context.Context, projectId string, promql string, params map[string]interface{}, start time.Time,
	end time.Time, step time.Duration) (*promclient.Result, error)

QueryRange 查询历史数据 带格式的查询

func QueryRangeMatrix

func QueryRangeMatrix(ctx context.Context, projectId string, promql string, params map[string]interface{},
	start time.Time, end time.Time, step time.Duration) (model.Matrix, []string, error)

QueryRangeMatrix 查询历史数据, 包含租户等信息

func QueryValue

func QueryValue(ctx context.Context, projectId string, promql string, params map[string]interface{},
	t time.Time) (string, error)

QueryValue 查询第一个值 format 格式 %<var>s

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL