fix: rm dublicated queries
@@ -20,21 +20,6 @@ class Databases(Plugin):
query_agent_discovery = "SELECT json_build_object ('data',json_agg(json_build_object('{#DATABASE}',d.datname)))" \
" FROM pg_database d WHERE NOT datistemplate AND datallowconn AND datname!='postgres';"
- # dictionary to keep all queries in one container
- SQL = {"pgsql.database.discovery{0}": "SELECT json_build_object "
- "('data',json_agg(json_build_object('{#DATABASE}',d.datname)))" \
- " FROM pg_database d WHERE NOT datistemplate AND datallowconn "
- "AND datname!='postgres';",
- "pgsql.database.size{0}": "select pg_database_size(datname::text) from pg_catalog.pg_database where" \
- " datistemplate = false and datname = :'p1'",
- "pgsql.database.max_age{0}": "select age(datfrozenxid) from pg_catalog.pg_database "
- "where datistemplate = false " \
- "and datname = :'p1'",
- "pgsql.database.bloating_tables{0}": "select count(*) from pg_catalog.pg_stat_all_tables where " \
- "(n_dead_tup/(n_live_tup+n_dead_tup)::float8) > {0} and " \
- "(n_live_tup+n_dead_tup) > {1}",
- "pgsql.autovacumm.count{0}": Pooler.SQL['count_autovacuum'][0]
- }
key_db_discovery = "pgsql.database.discovery{0}"
key_db_size = "pgsql.database.size{0}"
key_db_age = "pgsql.database.max_age{0}"
