An open API service indexing awesome lists of open source software.

https://github.com/loafoe/hmac

HSDP Metrics Alert Collector
https://github.com/loafoe/hmac

hsdp metrics webhook

Last synced: about 2 months ago
JSON representation

HSDP Metrics Alert Collector

Awesome Lists containing this project

README

        

# 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](https://github.com/cloudfoundry-community/gautocloud) for service configuration.

# Docker
Use the included Dockerfile to build a docker image which can be deployed to CF directly.

```bash
$ 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.

```yaml
---
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](MAINTAINERS.md)

# License
License is MIT