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 ability to log alerts #1477

Merged
merged 5 commits into from May 15, 2017
Merged

Add ability to log alerts #1477

merged 5 commits into from May 15, 2017

Conversation

@mpchadwick
Copy link
Contributor

@mpchadwick mpchadwick commented May 13, 2017

  • CHANGELOG.md updated
  • Rebased/mergable
  • Tests pass
  • Sign CLA (if not already signed)

The problem

Kapacitor alerts cannot be set up to write to a log file.

The log alert type is especially useful when experimenting with things locally as it is really cheap to set up.

The Solution

Add the ability to send alerts to a log file

image

@goller
Copy link
Contributor

@goller goller commented May 13, 2017

@mpchadwick Thank you for the PR! It looks great. I'd like to see two things in the go code...

First, would you add the log functionality to kapacitor/ast.go and test it with kapacitor/ast_test.go?

It'll be pretty much a copy/paste of func extractTCP
ast.go is the translation of TICKscripts back into the JSON shape the web app uses.

... and secondly, would you add in test for kapacitor/alert_test.go Should be a copy/paste of tests Test tcp and Test tcp no argument.

@mpchadwick
Copy link
Contributor Author

@mpchadwick mpchadwick commented May 15, 2017

@goller updated. Thanks for explaining about the purpose of ast.go. I was wondering why the "log" button under "Send this Alert to" wasn't being pre-selected when navigating to a kapacitor alert configured to log. This was the info I was missing.

@goller
Copy link
Contributor

@goller goller commented May 15, 2017

@mpchadwick Looks perfect! Merge coming. It'll be included in our release this week

@mpchadwick
Copy link
Contributor Author

@mpchadwick mpchadwick commented May 15, 2017

@goller awesome. Should I update the changelog?

@goller
Copy link
Contributor

@goller goller commented May 15, 2017

@mpchadwick Yes plz :)

@goller
goller approved these changes May 15, 2017
@mpchadwick
Copy link
Contributor Author

@mpchadwick mpchadwick commented May 15, 2017

@goller done

@goller goller merged commit 7a25532 into influxdata:master May 15, 2017
@jaredscheib
Copy link
Contributor

@jaredscheib jaredscheib commented May 15, 2017

Great work @mpchadwick -- and thank you!

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

Successfully merging this pull request may close these issues.

None yet

3 participants