From 5f43211f67c75cdc8a562fc6e7da180cb4bee881 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Thu, 23 Mar 2017 13:57:11 +0100 Subject: [PATCH] Blacklist systemd scope units Blacklist `scope` units from systemd collector by default. These units are created with unique IDs programatically[0]. This leads to huge cardinality problems. [0]: https://www.freedesktop.org/software/systemd/man/systemd.scope.html --- collector/systemd_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/systemd_linux.go b/collector/systemd_linux.go index 0d64397f..76090fc5 100644 --- a/collector/systemd_linux.go +++ b/collector/systemd_linux.go @@ -27,7 +27,7 @@ import ( var ( unitWhitelist = flag.String("collector.systemd.unit-whitelist", ".+", "Regexp of systemd units to whitelist. Units must both match whitelist and not match blacklist to be included.") - unitBlacklist = flag.String("collector.systemd.unit-blacklist", "", "Regexp of systemd units to blacklist. Units must both match whitelist and not match blacklist to be included.") + unitBlacklist = flag.String("collector.systemd.unit-blacklist", ".+\\.scope", "Regexp of systemd units to blacklist. Units must both match whitelist and not match blacklist to be included.") ) type systemdCollector struct {