datasource

package
v0.0.0-...-bb0d4a4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PieLegendBlackName = []string{"job", "instance", "__name__", "e_guid"}

Functions

func CheckPrometheusQL

func CheckPrometheusQL(promQl string) error

func GetSerialName

func GetSerialName(query *m.QueryMonitorData, tagMap map[string]string, dataLength int, metricFirst bool) string

func InitPrometheusDatasource

func InitPrometheusDatasource()

func PrometheusData

func PrometheusData(query *m.QueryMonitorData) []*m.SerialModel

func QueryLogKeywordData

func QueryLogKeywordData() (result map[string]float64, err error)

func QueryPromQLMetric

func QueryPromQLMetric(promQl, address string, start, end int64) (metricList []string, err error)

Types

type DataSource

type DataSource struct {
	Id                int
	Name              string
	Type              string
	Url               string
	Password          string
	User              string
	Database          string
	BasicAuth         bool
	BasicAuthUser     string
	BasicAuthPassword string
	WithCredentials   bool
	IsDefault         bool
	ReadOnly          bool
	Created           time.Time
	Updated           time.Time
}

func (*DataSource) GetHttpClient

func (ds *DataSource) GetHttpClient() (*http.Client, error)

func (*DataSource) GetHttpTransport

func (ds *DataSource) GetHttpTransport() (*http.Transport, error)

type DataSourceParam

type DataSourceParam struct {
	DataSource *DataSource
	Host       string
	Token      string
}

Jump to

Keyboard shortcuts

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