loganalytics

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseTableToFrame

func ResponseTableToFrame(table *types.AzureResponseTable, refID string, executedQuery string) (*data.Frame, error)

ResponseTableToFrame converts an AzureResponseTable to a data.Frame.

Types

type AzureLogAnalyticsAPIError

type AzureLogAnalyticsAPIError struct {
	Details *[]AzureLogAnalyticsAPIErrorBase `json:"details,omitempty"`
	Code    *string                          `json:"code,omitempty"`
	Message *string                          `json:"message,omitempty"`
}

Error definition has been inferred from real data and other model definitions like https://github.com/Azure/azure-sdk-for-go/blob/3640559afddbad452d265b54fb1c20b30be0b062/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go

type AzureLogAnalyticsAPIErrorBase

type AzureLogAnalyticsAPIErrorBase struct {
	Code       *string                      `json:"code,omitempty"`
	Message    *string                      `json:"message,omitempty"`
	Innererror *AzureLogAnalyticsInnerError `json:"innererror,omitempty"`
}

type AzureLogAnalyticsDatasource

type AzureLogAnalyticsDatasource struct {
	Proxy types.ServiceProxy
}

AzureLogAnalyticsDatasource calls the Azure Log Analytics API's

func (*AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery

func (e *AzureLogAnalyticsDatasource) ExecuteTimeSeriesQuery(ctx context.Context, originalQueries []backend.DataQuery, dsInfo types.DatasourceInfo, client *http.Client,
	url string, tracer tracing.Tracer) (*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 (*AzureLogAnalyticsDatasource) ResourceRequest

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

type AzureLogAnalyticsInnerError

type AzureLogAnalyticsInnerError struct {
	Code         *string `json:"code,omitempty"`
	Message      *string `json:"message,omitempty"`
	Severity     *int    `json:"severity,omitempty"`
	SeverityName *string `json:"severityName,omitempty"`
}

type AzureLogAnalyticsQuery

type AzureLogAnalyticsQuery struct {
	RefID        string
	ResultFormat string
	URL          string
	JSON         json.RawMessage
	Params       url.Values
	Target       string
	TimeRange    backend.TimeRange
}

AzureLogAnalyticsQuery is the query request that is built from the saved values for from the UI

type AzureLogAnalyticsResponse

type AzureLogAnalyticsResponse struct {
	Tables []types.AzureResponseTable `json:"tables"`
	Error  *AzureLogAnalyticsAPIError `json:"error,omitempty"`
}

AzureLogAnalyticsResponse is the json response object from the Azure Log Analytics API.

func (*AzureLogAnalyticsResponse) GetPrimaryResultTable

func (ar *AzureLogAnalyticsResponse) GetPrimaryResultTable() (*types.AzureResponseTable, error)

GetPrimaryResultTable returns the first table in the response named "PrimaryResult", or an error if there is no table by that name.

type LogAnalyticsMeta

type LogAnalyticsMeta struct {
	ColumnTypes  []string `json:"azureColumnTypes"`
	Subscription string   `json:"subscription"`
	Workspace    string   `json:"workspace"`
	EncodedQuery []byte   `json:"encodedQuery"` // EncodedQuery is used for deep links.
}

LogAnalyticsMeta is a type for the a Frame's Meta's Custom property.

Jump to

Keyboard shortcuts

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