Skip to content

Instantly share code, notes, and snippets.

@cevian
Last active November 23, 2022 21:10
Show Gist options
  • Save cevian/d63b36192a71514978786466d54e0629 to your computer and use it in GitHub Desktop.
Save cevian/d63b36192a71514978786466d54e0629 to your computer and use it in GitHub Desktop.
info_ha_queries.sql
\pset pager off
\set ECHO all
\set ON_ERROR_STOP 0
select version();
\dx
select now()
\x off
select * from _prom_catalog.ha_leases
order by cluster_name, lease_start desc;
\x off
select * from _prom_catalog.ha_leases_logs
order by cluster_name, lease_start desc;
\x off
select time_bucket('10 min', time) from prom_data.up group by 1 order by 1;
\x on
SHOW ALL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment