这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@KozzyKoder
Copy link
Contributor

@KozzyKoder KozzyKoder commented Jun 29, 2018

Hello,
we have templates in bosun defining what bosun sends.
those templates currently define the alert name as

static prefix 'bosun' concatinated with
alert name concatinated with
alert keys (tags)
some of the teams want to have custom prefixes for their alerts,
e.g. instead of bosun.alertname.key1 they want to have bosun.team_name.alertname.key1

this is currently possible to implement in alert notifications:
you define prefix as the alert variable and then use it in the template
but sadly the it's not possible for action templates to access alert variables

Please, see basic implementation. Didn't find documentation for action-specific template data where wanted to add description of AlertVars. Also tried to make syntax looking like Alert.Vars, but field Alert already declared as string.
Will be glad to hear any comments.

Thanks!

@captncraig captncraig merged commit 9705e28 into bosun-monitor:master Oct 30, 2018
dschneller added a commit to Rheinwerk/bosun that referenced this pull request Jan 14, 2019
* 'master' of https://github.com/bosun-monitor/bosun: (39 commits)
  Fix crashing in Limit and reduce functions (bosun-monitor#2342)
  Fix influxdb nested functions (bosun-monitor#2328)
  cmd/bosun: influxdb - cleanup http client connection resources (bosun-monitor#2332)
  docs: add example for streak func
  cmd/bosun: expose url shorter service to templates (bosun-monitor#2340)
  docs: fix GraphLink/Rule template documentation The documentation of GraphLink was actually the documentation for the Rule function, which was not documented.
  cmd/bosun pass alert variables to action notification (bosun-monitor#2275)
  cmd/scollector: httpunit - rescode metric and url metadata (bosun-monitor#2338)
  cmd/bosun: bump db schema version (bosun-monitor#2339)
  Bump Go versions and use '.x' to always get latest patch versions (bosun-monitor#2337)
  cmd/bosun: fix single dimension case in azure insights also avoid possible panic
  cmd/bosun: go generate
  Change line stroke to 1px.
  cmd/bosun: support Azure Application Insights metrics
  vendor: Azure sdk
  docs: remove es conf change note
  docs: system conf, doc Scheme param
  build: fix arch in release script
  build: docker release - go1.6 -> 1.11
  docs: update .GetIncidentState example End must be checked nil in case it was never set somehow
  ...

# Conflicts:
#	build/build.go
#	cmd/scollector/collectors/elasticsearch.go
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants