metrics

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const AzureMonitorAPIVersion = "2021-05-01"

Variables

This section is empty.

Functions

func BuildSubscriptionMetricsURL

func BuildSubscriptionMetricsURL(subscription string) string

BuildSubscriptionMetricsURL returns a URL for querying metrics for all resources in a subscription It requires to set a $filter and a region parameter

Types

type AzureMonitorDatasource

type AzureMonitorDatasource struct {
	Proxy  types.ServiceProxy
	Logger log.Logger
}

AzureMonitorDatasource calls the Azure Monitor API - one of the four API's supported

func (*AzureMonitorDatasource) ExecuteTimeSeriesQuery

func (e *AzureMonitorDatasource) ExecuteTimeSeriesQuery(ctx context.Context, originalQueries []backend.DataQuery, dsInfo types.DatasourceInfo, client *http.Client, url string, fromAlert bool) (*backend.QueryDataResponse, error)

executeTimeSeriesQuery does the following: 1. build the AzureMonitor url and querystring for each query 2. executes each query by calling the Azure Monitor API 3. parses the responses for each query into data frames

func (*AzureMonitorDatasource) ResourceRequest

func (e *AzureMonitorDatasource) ResourceRequest(rw http.ResponseWriter, req *http.Request, cli *http.Client) (http.ResponseWriter, error)

Jump to

Keyboard shortcuts

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