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

[Postgres] hard limit on pg count metric #2575

Merged
merged 2 commits into from
Jun 7, 2016

Conversation

masci
Copy link
Contributor

@masci masci commented Jun 7, 2016

Counting the number of tables to provide the postgresql.table.count metric can be very expensive, especially on large clusters.

This PR contains two changes to mitigate the impact of a slow count:

  1. Put an hard limit on the count, not user-configurable
  2. Suggest to disable the metric in the postgres.yaml file

For backward compatibility, the metric is still collected by default

Notice: couldn't provide an integration test for the hard limit feature because the strings containing the SQL code are class fields evaluated at import time.

@masci masci force-pushed the massi/configure_postgres_count_metrics branch from 15ccbef to c06420b Compare June 7, 2016 19:52
@masci masci changed the title [WIP][Postgres] hard limit on pg count metric [Postgres] hard limit on pg count metric Jun 7, 2016
@remh
Copy link

remh commented Jun 7, 2016

👍

@remh remh added this to the 5.8.3 milestone Jun 7, 2016
@masci masci merged commit 60ca25f into master Jun 7, 2016
@masci masci deleted the massi/configure_postgres_count_metrics branch June 7, 2016 21:20
@masci masci restored the massi/configure_postgres_count_metrics branch June 7, 2016 21:45
degemer added a commit that referenced this pull request Jun 7, 2016
* master: (21 commits)
  [Postgres] hard limit on pg count metric (#2575)
  [procfs] make /proc configurable.
  [sqlserver] send service checks at every run (#2515)
  [http_check] SNI support for cert_expiration (#2521)
  [dev-env] DL ez_setup from preferred URL
  Example syntax using a wildcard, recommended by customer see ticket https://datadog.zendesk.com/agent/tickets/54475
  [collector] don't send the api_key with resources
  [checks] remove api_key from events payload
  [packaging] 5.9.0 nightlies
  [win32] plays well memory check timeouts
  [rabbitmq] Avoid the extra double lookup for 'rabbitmq_api_url' (#2543)
  [source] archive setuptools
  Added a note on how to get bundler installed
  [kubernetes] disable use_histogram by default (#2542)
  [powerdns_recursor] rename configuration file (#2538)
  [changelog] release 5.8.2
  Revert "Fix get_hostname for windows ec2 instances"
  [changelog] release `5.8.1`
  fixes .yaml.default
  [core] fixes windows conf (#2528)
  ...
@masci masci deleted the massi/configure_postgres_count_metrics branch June 8, 2016 14:18
gmmeyer pushed a commit that referenced this pull request Jun 17, 2016
* hard limit on pg count metric

* order by schemaname,relname to handle tables homonimy across schemas
gmmeyer pushed a commit that referenced this pull request Jun 17, 2016
* hard limit on pg count metric

* order by schemaname,relname to handle tables homonimy across schemas
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

Successfully merging this pull request may close these issues.

2 participants