AzureMonitor: Alerting for Azure Application Insights (#19381)

* 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)
This commit is contained in:
Chad Nedzlek
2019-10-07 14:18:14 +02:00
committed by Daniel Lee
parent 92765a6c6f
commit 20faef8de5
30 changed files with 1806 additions and 500 deletions
@@ -0,0 +1,27 @@
{
"tables": [
{
"name": "PrimaryResult",
"columns": [
{
"name": "timestamp",
"type": "datetime"
},
{
"name": "value",
"type": "int"
}
],
"rows": [
[
"2019-09-13T01:02:03.456789Z",
1
],
[
"2019-09-13T02:02:03.456789Z",
2
]
]
}
]
}
@@ -0,0 +1,43 @@
{
"tables": [
{
"name": "PrimaryResult",
"columns": [
{
"name": "timestamp",
"type": "datetime"
},
{
"name": "value",
"type": "int"
},
{
"name": "segment",
"type": "string"
}
],
"rows": [
[
"2019-09-13T01:02:03.456789Z",
1,
"a"
],
[
"2019-09-13T01:02:03.456789Z",
2,
"b"
],
[
"2019-09-14T02:02:03.456789Z",
3,
"a"
],
[
"2019-09-14T02:02:03.456789Z",
4,
"b"
]
]
}
]
}
@@ -0,0 +1,9 @@
{
"value": {
"start": "2019-09-13T01:02:03.456789Z",
"end": "2019-09-13T02:02:03.456789Z",
"value": {
"avg": 1.2
}
}
}
@@ -0,0 +1,23 @@
{
"value": {
"start": "2019-09-13T01:02:03.456789Z",
"end": "2019-09-13T03:02:03.456789Z",
"interval": "PT1H",
"segments": [
{
"start": "2019-09-13T01:02:03.456789Z",
"end": "2019-09-13T02:02:03.456789Z",
"value": {
"avg": 1
}
},
{
"start": "2019-09-13T02:02:03.456789Z",
"end": "2019-09-13T03:02:03.456789Z",
"value": {
"avg": 2
}
}
]
}
}
@@ -0,0 +1,45 @@
{
"value": {
"start": "2019-09-13T01:02:03.456789Z",
"end": "2019-09-13T03:02:03.456789Z",
"interval": "PT1H",
"segments": [
{
"start": "2019-09-13T01:02:03.456789Z",
"end": "2019-09-13T02:02:03.456789Z",
"segments": [
{
"value": {
"avg": 1
},
"blob": "a"
},
{
"value": {
"avg": 3
},
"blob": "b"
}
]
},
{
"start": "2019-09-13T02:02:03.456789Z",
"end": "2019-09-13T03:02:03.456789Z",
"segments": [
{
"value": {
"avg": 2
},
"blob": "a"
},
{
"value": {
"avg": 4
},
"blob": "b"
}
]
}
]
}
}