Open VAdamec opened 7 years ago
Hm, already here :-) ALARM_FILTER
Hm, but seems that's only positive filter (match only ALARM_FILTER), what's probably better is negative (filter out given regexp)
Easiest is negate actual filter (server.es6)
diff --git a/eventer/src/server.es6 b/eventer/src/server.es6
index 5f83781..fe521b4 100644
--- a/eventer/src/server.es6
+++ b/eventer/src/server.es6
@@ -133,12 +133,12 @@ import assert from 'assert';
const matched = some(config.filter, (f) => fullName.match(new RegExp(f)));
if (matched) {
- return true;
- } else {
trace(`${fullName} ignored due to global filter setup('filter' config option)`)
+ } else {
+ return true;
}
} else {
- return true;
+ return false;
}
}
I will try to introduce negative filter option later.
This feature is definitely needed. Although the same thing could be done using looking head feature of RegExp, it's over complicated.
Add possibility to ignore some services (for example I have special Jenkins job which will remove and create testing service every minute to measure Rancher responses and catch possible bottlenecks). Right now no idea how to do it properly (without some superstupid condition and regexp in monitor.es6) but I'll try to sent some PR.