textfile: set windows_exporter_collector_success to 0, if an errors occurs (#1775)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2024-11-26 23:47:23 +01:00
committed by GitHub
parent ca04ad8fd2
commit 40b6f53479
3 changed files with 51 additions and 64 deletions

View File

@@ -304,8 +304,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error {
}
for nicName, nicData := range data {
if c.config.NicExclude.MatchString(nicName) ||
!c.config.NicInclude.MatchString(nicName) {
if c.config.NicExclude.MatchString(nicName) || !c.config.NicInclude.MatchString(nicName) {
continue
}