diff --git a/README.md b/README.md
index 666b638a..e4632551 100644
--- a/README.md
+++ b/README.md
@@ -166,6 +166,8 @@ To scrape metrics from all databases on a database server, the database DSN's ca
 `--auto-discover-databases` flag. When true, `SELECT datname FROM pg_database` is run for all configured DSN's. From the 
 result a new set of DSN's is created for which the metrics are scraped.
 
+In addition, the option `--exclude-databases` adds the possibily to filter the result from the auto discovery to discard databases you do not need.
+
 ### Running as non-superuser
 
 To be able to collect metrics from `pg_stat_activity` and `pg_stat_replication`
diff --git a/cmd/postgres_exporter/postgres_exporter.go b/cmd/postgres_exporter/postgres_exporter.go
index bc70bfd2..ae19745b 100644
--- a/cmd/postgres_exporter/postgres_exporter.go
+++ b/cmd/postgres_exporter/postgres_exporter.go
@@ -39,6 +39,7 @@ var (
 	queriesPath            = kingpin.Flag("extend.query-path", "Path to custom queries to run.").Default("").Envar("PG_EXPORTER_EXTEND_QUERY_PATH").String()
 	onlyDumpMaps           = kingpin.Flag("dumpmaps", "Do not run, simply dump the maps.").Bool()
 	constantLabelsList     = kingpin.Flag("constantLabels", "A list of label=value separated by comma(,).").Default("").Envar("PG_EXPORTER_CONSTANT_LABELS").String()
+	excludeDatabases       = kingpin.Flag("exclude-databases", "A list of databases to remove when autoDiscoverDatabases is enabled").Default("").Envar("PG_EXPORTER_EXCLUDE_DATABASES").String()
 )
 
 // Metric name parts.
@@ -883,6 +884,7 @@ type Exporter struct {
 
 	disableDefaultMetrics, disableSettingsMetrics, autoDiscoverDatabases bool
 
+	excludeDatabases []string
 	dsn              []string
 	userQueriesPath  string
 	constantLabels   prometheus.Labels
@@ -921,6 +923,13 @@ func AutoDiscoverDatabases(b bool) ExporterOpt {
 	}
 }
 
+// ExcludeDatabases allows to filter out result from AutoDiscoverDatabases
+func ExcludeDatabases(s string) ExporterOpt {
+	return func(e *Exporter) {
+		e.excludeDatabases = strings.Split(s, ",")
+	}
+}
+
 // WithUserQueriesPath configures user's queries path.
 func WithUserQueriesPath(p string) ExporterOpt {
 	return func(e *Exporter) {
@@ -1315,6 +1324,9 @@ func (e *Exporter) discoverDatabaseDSNs() []string {
 			continue
 		}
 		for _, databaseName := range databaseNames {
+			if contains(e.excludeDatabases, databaseName) {
+				continue
+			}
 			parsedDSN.Path = databaseName
 			dsns[parsedDSN.String()] = struct{}{}
 		}
@@ -1389,6 +1401,15 @@ func getDataSources() []string {
 	return strings.Split(dsn, ",")
 }
 
+func contains(a []string, x string) bool {
+	for _, n := range a {
+		if x == n {
+			return true
+		}
+	}
+	return false
+}
+
 func main() {
 	kingpin.Version(fmt.Sprintf("postgres_exporter %s (built with %s)\n", Version, runtime.Version()))
 	log.AddFlags(kingpin.CommandLine)
@@ -1421,6 +1442,7 @@ func main() {
 		AutoDiscoverDatabases(*autoDiscoverDatabases),
 		WithUserQueriesPath(*queriesPath),
 		WithConstantLabels(*constantLabelsList),
+		ExcludeDatabases(*excludeDatabases),
 	)
 	defer func() {
 		exporter.servers.Close()
diff --git a/tools/src b/tools/src
index f8cf471b..ad43c362 120000
--- a/tools/src
+++ b/tools/src
@@ -1 +1 @@
-/home/will/src/go/src/github.com/wrouesnel/postgres_exporter/tools/vendor
\ No newline at end of file
+/Users/alex/go/src/github.com/AlexisSellier/postgres_exporter/tools/vendor
\ No newline at end of file