You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom-metrics-example/custom-metrics.toml
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,38 +16,45 @@ from gv$sql
16
16
where last_active_time >= sysdate - 5/(24*60)
17
17
'''
18
18
19
+
# User segment queries may return zero rows on certain database configurations
19
20
[[metric]]
20
21
context = "size_user_segments_top100"
21
22
metricsdesc = {table_bytes="Gauge metric with the size of the tables in user segments."}
22
23
labels = ["segment_name"]
23
24
request = "select * from (select segment_name,sum(bytes) as table_bytes from user_segments where segment_type='TABLE' group by segment_name) order by table_bytes DESC FETCH NEXT 100 ROWS ONLY"
25
+
ignorezeroresult = true
24
26
25
27
[[metric]]
26
28
context = "size_user_segments_top100"
27
29
metricsdesc = {table_partition_bytes="Gauge metric with the size of the table partition in user segments."}
28
30
labels = ["segment_name"]
29
31
request = "select * from (select segment_name,sum(bytes) as table_partition_bytes from user_segments where segment_type='TABLE PARTITION' group by segment_name) order by table_partition_bytes DESC FETCH NEXT 100 ROWS ONLY"
32
+
ignorezeroresult = true
30
33
31
34
[[metric]]
32
35
context = "size_user_segments_top100"
33
36
metricsdesc = {cluster_bytes="Gauge metric with the size of the cluster in user segments."}
34
37
labels = ["segment_name"]
35
38
request = "select * from (select segment_name,sum(bytes) as cluster_bytes from user_segments where segment_type='CLUSTER' group by segment_name) order by cluster_bytes DESC FETCH NEXT 100 ROWS ONLY"
39
+
ignorezeroresult = true
36
40
37
41
[[metric]]
38
42
context = "size_dba_segments_top100"
39
43
metricsdesc = {table_bytes="Gauge metric with the size of the tables in user segments."}
40
44
labels = ["segment_name"]
41
45
request = "select * from (select segment_name,sum(bytes) as table_bytes from dba_segments where segment_type='TABLE' group by segment_name) order by table_bytes DESC FETCH NEXT 100 ROWS ONLY"
46
+
ignorezeroresult = true
42
47
43
48
[[metric]]
44
49
context = "size_dba_segments_top100"
45
50
metricsdesc = {table_partition_bytes="Gauge metric with the size of the table partition in user segments."}
46
51
labels = ["segment_name"]
47
52
request = "select * from (select segment_name,sum(bytes) as table_partition_bytes from dba_segments where segment_type='TABLE PARTITION' group by segment_name) order by table_partition_bytes DESC FETCH NEXT 100 ROWS ONLY"
53
+
ignorezeroresult = true
48
54
49
55
[[metric]]
50
56
context = "size_dba_segments_top100"
51
57
metricsdesc = {cluster_bytes="Gauge metric with the size of the cluster in user segments."}
52
58
labels = ["segment_name"]
53
-
request = "select * from (select segment_name,sum(bytes) as cluster_bytes from dba_segments where segment_type='CLUSTER' group by segment_name) order by cluster_bytes DESC FETCH NEXT 100 ROWS ONLY"
59
+
request = "select * from (select segment_name,sum(bytes) as cluster_bytes from dba_segments where segment_type='CLUSTER' group by segment_name) order by cluster_bytes DESC FETCH NEXT 100 ROWS ONLY"
0 commit comments