Changes the dimensionsFilters property to dimensionsFilter in the Azure Monitor Datasource's AzureMonitor service to make what is sent to match the saved model.
Before this, the property that the backend was expecting was not available in the case of alerting, where the stored model is fetched.
This also fixes a panic when there is a dimension alias but no dimension
Before this, if the user were to divide by 0.0, "Infinity" would be returned in the result and the user would get an error: "unexpected type, expected json.Number but got string". Now these values are properly set as Inf values (and also made sure to handle NaN as well).
This makes it so results are more stable between refreshes of data and fixes sorting issues with Azure Application Insights service as well as the two Azure Analytics services.
fixes#22937
When there is an error message in the HTTP response, this copies that error so it is relayed to the user by being shown in the frontend.
This also makes it so when there is an error the interpolated query string (ExecutedQueryString) is returned so users can see it in the query inspector.
- The Application Insights Service now returns a dataframe. This is a "wide" formatted dataframe with a single time index.
- Multiple "group by" dimensions may now be selected instead of just one with Application Insights.
- Some types are copied / slightly altered from the Azure Go SDK but that SDK is not imported at this time.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Azure Application Insights Analytics is no longer accessed by the edit button from within the Application Insights service. Instead, there is now an Insights Analytics option in the Service drop down.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
note: This is just Azure Monitor within the Azure Monitor datasource (not insights, insights analytics, or log analytics yet).
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* azuremonitor: add gzipped and base64 encoded query to metadata
for Azure Log Analytic query responses
* azure monitor: add fields to metadata for log analytics
* azuremonitor: correction to text in query editor
* azuremonitor: adds subscription id to result metadata
* azuremonitor: build deep link url for Log Analytics
Most of the information needed for building the url
comes from the backend. The workspace friendly name
and the resource group that the workspace belongs
to are fetched in a separate API call. This call is
cached otherwise there would be a workspaces call
per query on the dashboard.
* docs: azure log analytics deep linking
* Apply suggestions from code review
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* docs: fixing review comments for azure monitor
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
* azuremonitor: add support for log analytics macros
Also adds tests for the kql macros
* azuremonitor: backend implementation for Log Analytics
* azuremonitor: remove gzip header from plugin route
The Go net/http library adds an accept encoding header
for gzip automatically.
https://golang.org/src/net/http/transport.go\#L2454
So no need to specify it manually
* azuremonitor: parses log analytics time series
* azuremonitor: support for table data for Log Analytics
* azuremonitor: for log analytics switch to calling the API...
...from the backend for time series and table queries.
* azuremonitor: fix missing err check
* azuremonitor: support Azure China, Azure Gov...
for log analytics on the backend.
* azuremonitor: review fixes
* azuremonitor: rename test files folder to testdata
To follow Go conventions for test data in tests
* azuremonitor: review fixes
* azuremonitor: better error message for http requests
* azuremonitor: fix for load workspaces on config page
* azuremonitor: strict null check fixes
Co-authored-by: bergquist <carl.bergquist@gmail.com>
* Convert Azure Application Insights datasource to Go
Allows for alerting of Application Insights data source
Closes: #15153
* Fix timeGrainReset
* Default time interval for querys for alerts
* Fix a few rename related bugs
* Update readme to indicate App Insights alerting
* Fix typo and add tests to ensure migration is happening
* Address code review feedback (mostly typos and unintended changes)