-
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
Use details field from alert node in pagerduty #1512
Conversation
@phemmer your thoughts would be appreciated. |
Seems straightforward enough. Lets |
integrations/streamer_test.go
Outdated
@@ -7844,6 +7844,7 @@ stream | |||
.info(lambda: "count" > 6.0) | |||
.warn(lambda: "count" > 7.0) | |||
.crit(lambda: "count" > 8.0) | |||
.details('details') |
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.
Why change the test here? I'd like to test that the default behavior is not changed. Meaning if details is not specified that the pageDuty handler remains the same.
@@ -7828,6 +7828,8 @@ func TestStream_AlertPagerDuty(t *testing.T) { | |||
ts := pagerdutytest.NewServer() | |||
defer ts.Close() | |||
|
|||
defaultDetails := "{"Name":"cpu","TaskName":"TestStream_Alert","Group":"host=serverA","Tags":{"host":"serverA"},"ServerInfo":{"Hostname":"","ClusterID":"","ServerID":""},"ID":"kapacitor/cpu/serverA","Fields":{"count":10},"Level":"CRITICAL","Time":"1971-01-01T00:00:10Z","Message":"CRITICAL alert for kapacitor/cpu/serverA"}\n" |
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.
This is the default format that gets generated.
@nathanielc this should be ready to review again. Also, once this is done should I cherry pick it onto master? |
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.
Looks good. Do not cherry pick but rather merge the v1.3 branch back to master.
kk |
Whoops. Just realized i didn't update the changelog. Going to open another PR for that. |
Fixes #743
Previously the details field specified on an alert node was not being used in the pagerduty service. Instead, the results object that generated was being used. This PR now uses the details field specified.
@nathanielc is this all, or is there something I'm missing?
Required for all non-trivial PRs