Skip to content

Commit

Permalink
#84 Add debug logging of received messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose committed Sep 10, 2018
1 parent ca03a08 commit e0824c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [Unreleased](https://github.com/idealista/prom2teams/tree/develop)

## [2.2.0](https://github.com/idealista/prom2teams/tree/2.2.0)
[Full changelog](https://github.com/idealista/prom2teams/compare/2.1.2...2.2.0)
## Added
- *[#80](https://github.com/idealista/prom2teams/pull/79) Add the possibility of group alarms by alertname * @manuhortet
- *[#84](https://github.com/idealista/prom2teams/issues/84) View received message when debugging* @jnogol

## [2.1.2](https://github.com/idealista/prom2teams/tree/2.1.2)
[Full Changelog](https://github.com/idealista/prom2teams/compare/2.1.1...2.1.2)
Expand Down
3 changes: 3 additions & 0 deletions prom2teams/prometheus/message_schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from marshmallow import Schema, fields, post_load
import logging

log = logging.getLogger('prom2teams')

class MessageSchema(Schema):
receiver = fields.Str()
Expand All @@ -10,6 +12,7 @@ class MessageSchema(Schema):

@post_load
def get_alerts(self, message):
log.debug('JSON received is:\n%s', str(message))
prom_alerts = []
for alert in message['alerts']:
status = alert['status']
Expand Down

0 comments on commit e0824c8

Please sign in to comment.