Postgres On-Host Integration Collection List Wildcard?

I am implementing the Postgres On-Host Integration to try and troubleshoot some occasional performance issues we are seeing on our database.

I do not want to keep an eye on a specific table or index but rather the database as a whole. The documentation regarding the collection_list property in the yaml is a little sparse.

Would it be possible for me to specify a database and schema and leave the rest blank (or provide a wildcard) to gather metrics on all tables?

Ex: collection_list: '{"db_name":{"public":{}}}'

Hi @rcortez,

We currently don’t have this for the postgres integration. You’ll have to specify which entity you’ll want to monitor.

I know this isn’t what you wanted to hear, so I’ll go ahead and create a feature request here.

Our Product Managers and Engineers who plan our product roadmap are always interested in hearing new ideas about how to make New Relic even better, so I have submitted this as a feature request to be considered for a future release. While we can’t guarantee when or if this feature will be implemented, we take customer requests very seriously and use them to prioritize which features we implement next.

Please let me know if you have any questions.

Regards,

Paul

Is there an update on this feature request. I have a similar situation where tracking schema changes would be tedious and error prone.

Hello @kurt.stankey,

I’m not aware of this being out yet. You can track the postgres integration releases here though: https://github.com/newrelic/nri-postgresql/releases

Regards,

P

According to the documentation here this is supposed to work…but it didn’t for me. I’m still trying to get it going.

collection_list: ‘ALL’

Hi @Larry.Collicott, @rcortez

I happened to have a ticket that covered this just this week!

As you may know, the PostgreSQL integration has three valid kinds of syntax for its collection_list option:

  1. a JSON array of database names ([db1, db2]),
  2. a JSON object nesting databases → schemas → tables → indexes ('{"db1":{"public":{"tbl2":["ind1","ind2"],}}}
  3. ALL for just hoovering it all up

Using the JSON object, you can just leave some of the inner objects as nulls with something like the following:

collection_list : '{"db1": {}}
collection_list : '{"db1": { "schema":{}}}'
collection_list : '{"db1": { "schema":{ "tbl1":[]}}}'

Should all be valid, and the integration will only gather metrics up to the level of specificity you desire.

I hope this helps!

The setting we were looking for was collection_list: 'ALL'

Hi @Larry.Collicott

Are you seeing any errors in your agent logs from the PostgreSQL integration?

grep com.newrelic.postgresql /var/log/newrelic-infra.log