You need to have an admin user to be set up to collect metrics.
Statistics are collected from the PostgreSQL statistics collector subsystem. Ensure that the system is configured to collect information. The statistics collector is controlled by configuration parameters that are typically set in postgresql.conf. For more information see: https://www.postgresql.org/docs/12/index.html