-
Notifications
You must be signed in to change notification settings - Fork 490
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
Resetting alert levels #740
Merged
nathanielc
merged 15 commits into
influxdata:master
from
minhdanh:feature/alert_level_reset
Aug 8, 2016
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
73473c1
Implement alert level reset
66b486c
Fix logic issue
1b6442d
Fix syntax error
e9e2074
Rename variables
67a7778
Add test TestStream_Alert_WithReset
64994e8
Update sample data
a5f74c1
Rename test and add new test case
28290f2
Implement currentLevel for determineLevel function
eb1e9c6
Implement new way for evaluating reset expressions
c391f99
Minor refactor with getting current level
f254d50
Check the rest of the levels when reset expression not exist
0b9bf42
Handle errors when checking for first match level
006001c
Update CHANGELOG.md with alert reset expressions feature
9a3fbcd
Update docs with alert reset expresions example
7bdcde0
Return a bool instead of error type to indicate if a match was found
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000001 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000001 | ||
dbname | ||
rpname | ||
disk,type=sda,host=serverB value=39.0 0000000001 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=40.0 0000000002 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=92.6 0000000002 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=30.0 0000000003 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=95.6 0000000003 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=9.0 0000000004 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=93.1 0000000004 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000005 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=92.6 0000000005 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=61.0 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=95.8 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverC value=95.8 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=30.0 0000000007 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=91.3 0000000007 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=19.0 0000000008 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=72.3 0000000008 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000009 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000009 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=61.0 0000000010 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000010 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=81.0 0000000011 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000011 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=29.0 0000000012 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000001 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000001 | ||
dbname | ||
rpname | ||
disk,type=sda,host=serverB value=39.0 0000000001 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=40.0 0000000002 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=92.6 0000000002 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=30.0 0000000003 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=95.6 0000000003 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=29.0 0000000004 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=93.1 0000000004 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000005 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=92.6 0000000005 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=61.0 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=95.8 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverC value=95.8 0000000006 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=49.0 0000000007 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=91.3 0000000007 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=29.0 0000000008 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=72.3 0000000008 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=45.0 0000000009 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=97.1 0000000009 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=61.0 0000000010 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=73.1 0000000010 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=81.0 0000000011 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=28.2 0000000011 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=69.0 0000000012 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=77.0 0000000012 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=50.0 0000000013 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=43.4 0000000013 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=41.0 0000000014 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=32.1 0000000014 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverA value=25.0 0000000015 | ||
dbname | ||
rpname | ||
cpu,type=usage,host=serverB value=92.0 0000000015 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need separate scopePools for the reset expressions.
A scope pool simply reuses the existing scope objects for each evaluation of the expression. This helps the evaluation to remain allocation free. There is no expectation that a reset expression will use exactly the same fields and tags as the normal expression, so it will needs its own scope pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, at first I thought the reset expression is kind of "opposite" to the normal expression, so it may use the exact fields and tags from the scope pool of the normal expression. I'll have this updated.