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: default/macros.conf
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ definition = mstats sum(_value) as metric_value WHERE index=caca_metrics AND met
64
64
| stats sum(metric_value) as total by pretty_name, app \
65
65
| sort -total \
66
66
| head 10 \
67
-
| eval rank=row_number() \
67
+
| streamstats count as rank \
68
68
| eval metric_type="$metric_type$"
69
69
iseval = 0
70
70
@@ -73,22 +73,22 @@ args = dashboard_name
73
73
definition = mstats avg(_value) as avg_load_time WHERE index=caca_metrics AND pretty_name="$dashboard_name$" AND metric_name="dashboard.load_time" BY pretty_name span=1h \
74
74
| eval avg_load_time=round(avg_load_time, 2) \
75
75
| eval performance_rating=case(\
76
-
avg_load_time < 1000, "Excellent",\
77
-
avg_load_time < 3000, "Good",\
78
-
avg_load_time < 5000, "Fair",\
76
+
avg_load_time < 1000, "Excellent",\
77
+
avg_load_time < 3000, "Good",\
78
+
avg_load_time < 5000, "Fair",\
79
79
1=1, "Poor")
80
80
iseval = 0
81
81
82
82
[get_slow_dashboards]
83
83
definition = mstats avg(_value) as avg_load_time WHERE index=caca_metrics AND metric_name="dashboard.load_time" BY pretty_name, app span=1d \
84
84
| where _time >= relative_time(now(), "-7d") \
85
85
| stats avg(avg_load_time) as avg_load_time_7d by pretty_name, app \
@@ -100,25 +100,25 @@ definition = mstats sum(_value) as error_count WHERE index=caca_metrics AND metr
100
100
| eval {severity}=total_errors \
101
101
| stats sum(error) as errors sum(warn) as warnings values(error) as has_errors values(warn) as has_warns sum(total_errors) as total_issues by pretty_name, app \
102
102
| fillnull value=0 errors warnings \
103
-
| where total_issues > 0 \
103
+
| where total_issues > 0 \
104
104
| eval health_status=case(\
105
-
errors > 50, "Critical",\
106
-
errors > 10, "High",\
107
-
errors > 0, "Medium",\
108
-
warnings > 20, "Medium",\
105
+
errors > 50, "Critical",\
106
+
errors > 10, "High",\
107
+
errors > 0, "Medium",\
108
+
warnings > 20, "Medium",\
109
109
1=1, "Low") \
110
110
| sort -errors -warnings
111
111
iseval = 0
112
112
113
113
[get_problematic_dashboards]
114
114
definition = `get_all_dashboards_summary` \
115
-
| where health_status="critical" OR health_status="warning" OR avg_load_time_7d > 5000 \
115
+
| where health_status="critical" OR health_status="warning" OR avg_load_time_7d > 5000 \
116
116
| eval issue_type=case(\
117
-
health_status="critical" AND avg_load_time_7d > 5000, "Health + Performance",\
117
+
health_status="critical" AND avg_load_time_7d > 5000, "Health + Performance",\
118
118
health_status="critical", "Health Issues",\
119
-
health_status="warning" AND avg_load_time_7d > 5000, "Health + Performance",\
119
+
health_status="warning" AND avg_load_time_7d > 5000, "Health + Performance",\
0 commit comments