-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.aks-single.yaml
56 lines (54 loc) · 1.76 KB
/
example.aks-single.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
#################################
# This example sends the query to every LogAnalytics workspace and fetches AKS log information (single mode):
#
# azure_metrics_loganalytics_ingestion_aks_rows: number of log lines per namespace in 1 hour
# azure_metrics_loganalytics_ingestion_aks_bytes: log bytes per namespace in 1 hour
#
#################################
queries:
#########################################################
## rows metric for tables (per second)
- metric: azure_metrics_loganalytics_ingestion_aks_rows
query: |-
ContainerLog
| join kind = inner (KubePodInventory
| project ContainerID, PodName=Name, ControllerKind, ControllerName, Namespace
| distinct *
) on ContainerID
| project Namespace
| summarize count_ = count() by Namespace
| project Namespace, count_ = (todouble(count_) / 3600)
timespan: PT1H
fields:
-
name: Namespace
target: sourceNamespace
type: id
-
name: count_
type: value
defaultField:
type: ignore
#########################################################
## bytes metric for tables (per second)
- metric: azure_metrics_loganalytics_ingestion_aks_bytes
query: |-
ContainerLog
| where _IsBillable == true
| join kind = inner (KubePodInventory
| project ContainerID, PodName=Name, ControllerKind, ControllerName, Namespace
| distinct *
) on ContainerID
| summarize count_ = sum(_BilledSize) by Namespace
| project Namespace, count_ = (todouble(count_) / 3600)
timespan: PT1H
fields:
-
name: Namespace
target: sourceNamespace
type: id
-
name: count_
type: value
defaultField:
type: ignore