hmac

command module
v0.0.0-...-a8c76d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: MIT, MIT Imports: 3 Imported by: 0

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 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

Documentation

Overview

Copyright © 2020 Andy Lo-A-Foe <andy.lo-a-foe@philips.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL