-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.yaml
108 lines (99 loc) · 3.42 KB
/
example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#################################
# This example sends the query to every LogAnalytics workspace and fetches general information:
#
# azure_metrics_loganalytics_ingestion_overall_rows: number of log lines per LogAnalytics table in 1 hour
# azure_metrics_loganalytics_ingestion_overall_bytes: log bytes per LogAnalytics table in 1 hour
# azure_metrics_loganalytics_ingestion_latency*: log ingestion latency metrics
#
#################################
queries:
#########################################################
## rows metric for tables (per second)
- metric: azure_metrics_loganalytics_ingestion_overall_rows
query: |-
union withsource=sourceTable *
| project sourceTable
| summarize count_ = count() by sourceTable
| project sourceTable, count_ = (todouble(count_) / 3600)
timespan: PT1H
fields:
-
name: sourceTable
type: id
-
name: count_
type: value
defaultField:
type: ignore
#########################################################
## bytes metric for tables (per second)
- metric: azure_metrics_loganalytics_ingestion_overall_bytes
query: |-
union withsource=sourceTable *
| where _IsBillable == true
| summarize count_ = sum(_BilledSize) by sourceTable
| project sourceTable, count_ = (todouble(count_) / 3600)
timespan: PT1H
fields:
-
name: sourceTable
type: id
-
name: count_
type: value
defaultField:
type: ignore
#########################################################
## ingestion latency
- metric: "azure_metrics_loganalytics_ingestion_latency"
publish: false # do not publish main metric, only sub metrics are published
query: |-
Heartbeat
| where TimeGenerated > ago(30m)
| extend E2EIngestionLatencyMin = todouble(datetime_diff("Second",ingestion_time(),TimeGenerated))/60
| extend AgentLatencyMin = todouble(datetime_diff("Second",_TimeReceived,TimeGenerated))/60
| summarize percentiles(E2EIngestionLatencyMin,50,75,95), percentiles(AgentLatencyMin,50,75,95)
timespan: PT30M
fields:
## e2e ingestion latency
- name: type
type: id
- name: percentile_E2EIngestionLatencyMin_95
metric: azure_metrics_loganalytics_ingestion_latency
labels:
type: E2EIngestionLatencyMin
le: 95
type: value
- name: percentile_E2EIngestionLatencyMin_75
metric: azure_metrics_loganalytics_ingestion_latency
labels:
type: E2EIngestionLatencyMin
le: 75
type: value
- name: percentile_E2EIngestionLatencyMin_50
metric: azure_metrics_loganalytics_ingestion_latency
labels:
type: E2EIngestionLatencyMin
le: 50
type: value
## agent ingestion latency
- name: percentile_AgentLatencyMin_95
metric: azure_metrics_loganalytics_ingestion_agent_latency
labels:
type: AgentLatencyMin
le: 95
type: value
- name: percentile_AgentLatencyMin_75
metric: azure_metrics_loganalytics_ingestion_agent_latency
labels:
type: AgentLatencyMin
le: 75
type: value
- name: percentile_AgentLatencyMin_50
metric: azure_metrics_loganalytics_ingestion_agent_latency
labels:
type: AgentLatencyMin
le: 50
type: value
defaultField:
type: ignore