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

Templating #37

Merged
merged 20 commits into from
Mar 26, 2019
Merged

Templating #37

merged 20 commits into from
Mar 26, 2019

Conversation

Knappek
Copy link
Collaborator

@Knappek Knappek commented Mar 3, 2019

This is my first draft for #12 . I did some research how to implement this and I think it would be good to use the Prometheus Alertmanager templating. It makes sense as prometheus-msteams is based on alertmanager and furthermore, end users might be more comfortable using alertmanager templating where they can use pre-defined functions etc.

There are some stuff still missing that I need to implement:

@bzon it would be great if you can have a look into it and tell me what you think.

This commit makes it easier handling multiple  prometheus alerts. Previously we combined multiple
alerts to a single teams message card, where we need to handle to large teams messages. In this
approach, we make it simpler by not combining multiple prometheus alerts to a single teams message
card as this might not be possible anymore with templating, as you would need to parse the json
and thus loosing the flexibility that we want to gain with the templating approach
@Knappek
Copy link
Collaborator Author

Knappek commented Mar 11, 2019

FYI: The current status is still very in progress as unit testing does not work at all and lots of old code snippets have been commented out...please ignore that for now :D . See #12 for more information about my thoughts and issues...

@Knappek
Copy link
Collaborator Author

Knappek commented Mar 18, 2019

Open ToDos:

  • adapt Helm chart
  • Docker volume mount template file
  • Update readme

@Knappek Knappek mentioned this pull request Mar 21, 2019
@Knappek Knappek marked this pull request as ready for review March 25, 2019 22:39
@codecov
Copy link

codecov bot commented Mar 25, 2019

Codecov Report

Merging #37 into master will increase coverage by 15.42%.
The diff coverage is 79.83%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #37       +/-   ##
===========================================
+ Coverage   43.22%   58.64%   +15.42%     
===========================================
  Files           2        2               
  Lines         118      162       +44     
===========================================
+ Hits           51       95       +44     
+ Misses         65       63        -2     
- Partials        2        4        +2
Impacted Files Coverage Δ
alert/prom_handler.go 0% <0%> (ø) ⬆️
alert/teams.go 79.16% <90.47%> (+11.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa1229c...d8a10be. Read the comment docs.

@Knappek Knappek mentioned this pull request Mar 26, 2019
@Knappek Knappek merged commit b06667c into prometheus-msteams:master Mar 26, 2019
@Knappek Knappek deleted the templating branch July 17, 2019 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant