loafoe / hmac

HSDP Metrics Alert Collector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HMAC

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.

Description

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.

Docker

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 .

Deployment

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

Endpoint

Once deployed the application listens for POST requests on /webhook/alerts/:token, where :token is the value from the environment variable TOKEN

Maintainers

See MAINTAINERS.md

License

License is MIT

About

HSDP Metrics Alert Collector

License:MIT License


Languages

Language:Go 98.2%Language:Dockerfile 1.8%