Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_stat_database_tup_updated metric always return zero-value #1047

Open
Notekunn opened this issue Jun 20, 2024 · 0 comments
Open

pg_stat_database_tup_updated metric always return zero-value #1047

Notekunn opened this issue Jun 20, 2024 · 0 comments

Comments

@Notekunn
Copy link

What did you do?

  • I ran a postgresql_exporter with non-superuser with pg_read_all_data role
  • I tried to query tup_returned,tup_fetched,tup_inserted,tup_updated,tup_deleted in database with above user, and it return value > 0

pastedImage

What did you expect to see?

  • pg_stat_database_tup_updated return value > 0

What did you see instead? Under which circumstances?

  • pg_stat_database_tup_updated return zero-value in all database
    Environment
  • System information:
Linux 4.18.0-477.21.1.el8_8.x86_64 x86_64
  • postgres_exporter version:
0.15.0
  • postgres_exporter flags:
--collector.database \
--collector.locks \
--collector.long_running_transactions \
--collector.postmaster \
--collector.process_idle \
--collector.replication \
--collector.replication_slot \
--web.listen-address=0.0.0.0:9187 \
--config.file=/opt/postgres_exporter/postgres_exporter.yml \
--web.telemetry-path=/metrics \
--log.level=debug
  • PostgreSQL version:
15.2 
  • Logs:
ts=2024-06-20T04:14:43.135Z caller=postgres_exporter.go:585 level=debug msg="Querying PostgreSQL version" server=localhost:5432
ts=2024-06-20T04:14:43.135Z caller=pg_setting.go:35 level=debug msg="Querying pg_setting view" server=localhost:5432
ts=2024-06-20T04:14:43.142Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_database_conflicts
ts=2024-06-20T04:14:43.143Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_replication
ts=2024-06-20T04:14:43.145Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_replication_slots
ts=2024-06-20T04:14:43.146Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_archiver
ts=2024-06-20T04:14:43.146Z caller=namespace.go:193 level=debug msg="Querying namespace" namespace=pg_stat_activity
ts=2024-06-20T04:14:43.153Z caller=collector.go:206 level=debug msg="collector succeeded" name=replication duration_seconds=0.001316776
ts=2024-06-20T04:14:43.154Z caller=collector.go:206 level=debug msg="collector succeeded" name=postmaster duration_seconds=0.00163996
ts=2024-06-20T04:14:43.157Z caller=collector.go:206 level=debug msg="collector succeeded" name=long_running_transactions duration_seconds=0.004693775
ts=2024-06-20T04:14:43.160Z caller=collector.go:206 level=debug msg="collector succeeded" name=stat_user_tables duration_seconds=0.008001546
ts=2024-06-20T04:14:43.164Z caller=collector.go:206 level=debug msg="collector succeeded" name=process_idle duration_seconds=0.011994573
ts=2024-06-20T04:14:43.165Z caller=collector.go:206 level=debug msg="collector succeeded" name=wal duration_seconds=0.012561638
ts=2024-06-20T04:14:43.165Z caller=collector.go:206 level=debug msg="collector succeeded" name=stat_bgwriter duration_seconds=0.013090927
ts=2024-06-20T04:14:43.166Z caller=collector.go:206 level=debug msg="collector succeeded" name=replication_slot duration_seconds=0.013968101
ts=2024-06-20T04:14:43.167Z caller=collector.go:206 level=debug msg="collector succeeded" name=statio_user_tables duration_seconds=0.015344327
ts=2024-06-20T04:14:43.168Z caller=pg_stat_database.go:280 level=debug collector=stat_database msg="Skipping collecting metric because it has no datname"
ts=2024-06-20T04:14:43.168Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.168Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.168Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=pg_stat_database.go:350 level=debug collector=stat_database msg="No metric for stats_reset, will collect 0 instead"
ts=2024-06-20T04:14:43.169Z caller=collector.go:206 level=debug msg="collector succeeded" name=stat_database duration_seconds=0.016948452
ts=2024-06-20T04:14:43.171Z caller=collector.go:206 level=debug msg="collector succeeded" name=locks duration_seconds=0.018694817
ts=2024-06-20T04:14:43.182Z caller=collector.go:206 level=debug msg="collector succeeded" name=database duration_seconds=0.029565902

pastedImage (1)

@Notekunn Notekunn changed the title pg_stat_database_tup_updated always return zero-value pg_stat_database_tup_updated metric always return zero-value Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant