X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=blobdiff_plain;f=python.d%2Fpostgres.chart.py;h=1976e2a61c49a0bb025677ac4c347f47ec3829a1;hp=d359bb4f7a587039315d9b5d927785c72159b7c9;hb=d31074058c1a217de383dd85eca1e2a77aba7579;hpb=909e26f825bc1f6f907231761412c885331fec7e diff --git a/python.d/postgres.chart.py b/python.d/postgres.chart.py index d359bb4f..1976e2a6 100644 --- a/python.d/postgres.chart.py +++ b/python.d/postgres.chart.py @@ -242,6 +242,7 @@ class Service(SimpleService): self.definitions = deepcopy(CHARTS) self.table_stats = configuration.pop('table_stats', False) self.index_stats = configuration.pop('index_stats', False) + self.database_poll = configuration.pop('database_poll', None) self.configuration = configuration self.connection = False self.is_superuser = False @@ -281,6 +282,9 @@ class Service(SimpleService): is_superuser = check_if_superuser_(cursor, QUERIES['IF_SUPERUSER']) cursor.close() + if (self.database_poll and isinstance(self.database_poll, str)): + self.databases = [dbase for dbase in self.databases if dbase in self.database_poll.split()] or self.databases + self.locks_zeroed = populate_lock_types(self.databases) self.add_additional_queries_(is_superuser) self.create_dynamic_charts_()