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

Add support for enable/disable some checks #21

Closed
lyrixx opened this issue Nov 10, 2014 · 10 comments
Closed

Add support for enable/disable some checks #21

lyrixx opened this issue Nov 10, 2014 · 10 comments

Comments

@lyrixx
Copy link
Contributor

lyrixx commented Nov 10, 2014

I have lot of checks in my DC, but I don't want every check triggers an alert. Some check are not so important (ram usage, load usage). they are here just for quick overview of our DC, and to quickly find an error when something goes wrong.

So, I see at least two options to configure this:

  1. Add a black-list of check name consul-alerts/config/checks/black-list : ["load_usage", "memory_usage"].
  2. By check on node: consul-alerts/checks/consumer-0.insight-d1/_/disk_usage_disable: true

I think the first option better fits my use case, because I want to ignore (all load|memory)_usage. But the second one is more granular.

What do you think?

@bcwilsondotcom
Copy link

+1 on this. One of my concerns with moving all of my monitoring/alerting from Sensu to Consul is not easily being able to enable/disable alerting on checks.

I think both of lyrixx's options are valid scenarios. Either I have a node which I want to disable alerting on temporarily, or, I have a check script which is behaving undesirably on all nodes and I want to disable that check completely.

@hunter
Copy link
Contributor

hunter commented Nov 11, 2014

Although it would add complexity, it might actually be useful to allow both a full black list and individual hosts (or even tags).

@darkcrux
Copy link
Contributor

I like both idea. We can possibly add both. The blacklist would have more weight than the individual config.

Basically, if it's blacklisted, ignore it right away. If not, check if it's enabled/disabled. Tags would probably be the most flexible (and more complex) solution.

@darkcrux
Copy link
Contributor

Hi guys, just release v0.1.2 with a blacklist feature. Config guide is in the README. Check it out. I think we've covered most use-cases with this. We can implement a tag based solution sometime soon.

@lyrixx
Copy link
Contributor Author

lyrixx commented Nov 14, 2014

Huhu, I just noticed it in my logs

time="2014-11-14T09:59:15Z" level="info" msg="Unable to check blacklist for frontend-1.insight-d1:_:database, return false"

Thanks, I will be able to "stop" checks during deploy, and to always discard some checks ;)

@darkcrux
Copy link
Contributor

There's two reason for that message (it should have been a warning, not an info, will fix the logs). Either consul-alerts/config/checks/frontend-1.insight-d1/_/database/blacklisted does not exist, or the value is not true or false. Or maybe a typo? ;)

@lyrixx
Copy link
Contributor Author

lyrixx commented Nov 14, 2014

Yes, the value does not exist (yet). I just noticed that when I tried to debbuging the issue with slack. ;)

@darkcrux
Copy link
Contributor

haha. yeah. Logging needs better cleanup. I'll add it to my list.

@darkcrux
Copy link
Contributor

Just release v0.2.0 with changes to how this is implemented. Fixed a possible race condition which @lyrixx pointed out. It's much simpler now.

Check out the README for more info. Cheers.

@lyrixx
Copy link
Contributor Author

lyrixx commented Nov 14, 2014

perfect ;)

@lyrixx lyrixx closed this as completed Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants