File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ def make_alert_message(
527527 )
528528 metric_timestamp_to = (
529529 df_alert_metric ["metric_timestamp" ].max ().strftime ("%Y-%m-%d %H:%M" )
530- )
530+ )
531531 graph_title = f"{ metric_name } ({ metric_timestamp_from } to { metric_timestamp_to } )"
532532 message = ""
533533 if ascii_graph :
Original file line number Diff line number Diff line change @@ -4,61 +4,61 @@ Template for generating the input data for the llmalert job.
44
55with
66
7- metric_value_data as
7+ metric_value_data as
88(
99select distinct
1010 metric_timestamp,
1111 metric_batch,
1212 metric_name,
1313 avg (metric_value) AS metric_value
14- from
14+ from
1515 {{ table_key }}
1616where
1717 metric_batch = ' {{ metric_batch }}'
18- and
18+ and
1919 metric_type = ' metric'
20- and
20+ and
2121 date (metric_timestamp) >= date (' now' , ' -{{ llmalert_metric_timestamp_max_days_ago }} day' )
2222group by metric_timestamp, metric_batch, metric_name
2323),
2424
25- metric_score_data as
25+ metric_score_data as
2626(
2727select distinct
2828 metric_timestamp,
2929 metric_batch,
3030 metric_name,
3131 avg (metric_value) AS metric_score
32- from
32+ from
3333 {{ table_key }}
3434where
3535 metric_batch = ' {{ metric_batch }}'
36- and
36+ and
3737 metric_type = ' score'
38- and
38+ and
3939 date (metric_timestamp) >= date (' now' , ' -{{ llmalert_metric_timestamp_max_days_ago }} day' )
4040group by metric_timestamp, metric_batch, metric_name
4141),
4242
43- metric_alert_data as
43+ metric_alert_data as
4444(
4545select distinct
4646 metric_timestamp,
4747 metric_batch,
4848 metric_name,
4949 avg (metric_value) AS metric_alert
50- from
50+ from
5151 {{ table_key }}
5252where
5353 metric_batch = ' {{ metric_batch }}'
54- and
54+ and
5555 metric_type = ' alert'
56- and
56+ and
5757 date (metric_timestamp) >= date (' now' , ' -{{ llmalert_metric_timestamp_max_days_ago }} day' )
5858group by metric_timestamp, metric_batch, metric_name
5959),
6060
61- metric_value_recency_ranked as
61+ metric_value_recency_ranked as
6262(
6363select
6464 metric_timestamp,
7777 m .metric_value ,
7878 ifnull(s .metric_score ,0 ) as metric_score,
7979 ifnull(a .metric_alert ,0 ) as metric_alert
80- from
80+ from
8181 metric_value_recency_ranked m
8282left join
8383 metric_score_data s
You can’t perform that action at this time.
0 commit comments