def METHOD_NAME(self, zbx):
    result = Pooler.query("""
    SELECT datname,
           pg_database_size(datname::text),
           age(datfrozenxid)
    FROM pg_catalog.pg_database
    WHERE datistemplate = false;
    """)
    dbs = []
    bloat_count = []
    for info in result:
        dbs.append({"{#DATABASE}": info[0]})
        zbx.send("pgsql.database.size[{0}]".format(info[0]), int(info[1]))
        zbx.send("pgsql.database.max_age[{0}]".format(info[0]), int(info[2]))
        bloat_count = Pooler.query(
            self.query_bloating_tables.format(self.plugin_config("bloat_scale"), self.plugin_config("min_rows")),
            info[0])[0][0]
        zbx.send("pgsql.database.bloating_tables[{0}]".format(info[0]), int(bloat_count))
        invalid_indexes_count = Pooler.query(self.query_invalid_indexes, info[0])[0][0]
        zbx.send("pgsql.database.invalid_indexes[{0}]".format(info[0]), int(invalid_indexes_count))
    zbx.send("pgsql.database.discovery[]", zbx.json({"data": dbs}))
    del dbs, bloat_count, invalid_indexes_count