Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - ignore list #31

Open
VAdamec opened this issue May 23, 2017 · 4 comments
Open

Feature request - ignore list #31

VAdamec opened this issue May 23, 2017 · 4 comments

Comments

@VAdamec
Copy link

VAdamec commented May 23, 2017

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.

@VAdamec
Copy link
Author

VAdamec commented May 23, 2017

Hm, already here :-) ALARM_FILTER

@VAdamec VAdamec closed this as completed May 23, 2017
@VAdamec VAdamec reopened this May 23, 2017
@VAdamec
Copy link
Author

VAdamec commented May 23, 2017

Hm, but seems that's only positive filter (match only ALARM_FILTER), what's probably better is negative (filter out given regexp)

@VAdamec
Copy link
Author

VAdamec commented May 23, 2017

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.

@qiuwei
Copy link

qiuwei commented Nov 21, 2017

This feature is definitely needed. Although the same thing could be done using looking head feature of RegExp, it's over complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants