HMAC AKA HSDP Metrics Alerts Collector is a tiny microservice which acts as a webhook receiver for the alerts generated by the HSDP Metrics alerts service.
This microservice can run standalone but can also be deployed as a sidecar as part of a Grafana frontend. The service collects and stores alert payloads in a PostgreSQL database. The application is optimized for deployment to Cloud foundry but can also run on other container orchestration platforms. It uses gautocloud for service configuration.
Use the included Dockerfile to build a docker image which can be deployed to CF directly.
$ git clone https://github.com/philips-labs/hmac.git
$ cd hmac
$ docker build -t hmac .
See the below manifest.yml file as an example.
---
applications:
- name: hmac
domain: hmac.host.com
instances: 1
memory: 128M
disk_quota: 128M
routes:
- route: hmac.host.com
env:
HMAC_TOKEN: RandomTokenHere
services:
- postgresql
stack: cflinuxfs3
Once deployed the application listens for POST
requests on /webhook/alerts/:token
, where :token
is the value from the environment variable TOKEN
See MAINTAINERS.md
License is MIT