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

show alert.Message as monitor message in mkr alerts list #173

Merged
merged 4 commits into from Oct 29, 2018

Conversation

Projects
None yet
2 participants
@astj
Contributor

astj commented Oct 26, 2018

example:

aaa 2018-10-26 17:05:52 CRITICAL HTTP CRITICAL: Get https://127.0.0.1/: dial tcp 127.0.0.1:443: connect: connection refused xxxproxy22.local standby [XXX:proxy]
bbb 2018-10-25 16:35:04 CRITICAL connectivity yyybackend10.local working [YYY:backend]

Handling:

  • display up to 100 runes
  • trim at first newline ([\r\n])
alerts.go Outdated
truncated = true
}
if msgU := utf8string.NewString(msg); msgU.RuneCount() > 100 {
msg = msgU.Slice(0, 100)

This comment has been minimized.

@itchyny

itchyny Oct 29, 2018

Contributor

What's the benefit of using utf8string package, rather than casting to []rune?

This comment has been minimized.

@astj

astj Oct 29, 2018

Contributor

Just I forgot about []rune 😱 . Fixed to use []rune.

@itchyny

This comment has been minimized.

Contributor

itchyny commented Oct 29, 2018

LGTM

@astj

This comment has been minimized.

Contributor

astj commented Oct 29, 2018

Thanks!

@astj astj merged commit fd7e48e into master Oct 29, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@astj astj deleted the alerts-add-check-monitoring-message branch Oct 29, 2018

@yuuki yuuki referenced this pull request Nov 12, 2018

Merged

Release version 0.33.0 #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment