We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent facd7a8 commit 22d417dCopy full SHA for 22d417d
log.sql
@@ -88,6 +88,16 @@ create view report24h as
88
where i.t > now() - interval '1 days'
89
group by 2 order by count desc;
90
91
+create or replace view reporthosts as
92
+ SELECT count(1) AS count,
93
+ substring(firstline(e.msg),1,80) as firstline,
94
+ array_agg(DISTINCT i.hostname) AS hosts
95
+ FROM error e
96
+ JOIN instance i ON i.id = e.id
97
+ WHERE e.t > (now() - '24:00:00'::interval)
98
+ GROUP BY 2
99
+ ORDER BY (count(1));
100
+
101
create view instance_activity as
102
select i.hostname, i.target, max(e.t)
103
from instance i join error e on (i.id = e.id)
0 commit comments