shortly

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT

README

shortly

License Tag Go Report main Coverage


A link shortening service.

Has integration with Prometheus, Grafana and Alertmanager.

As a datastorage can utilise bbolt or store data in memory as a map.

Configuration is performed via shortly.conf. Currently only 2 kinds of DB are supported: bbolt and inmem.

Installation

Source

$ git clone https://github.com/vkuksa/shortly.git && cd shortly
$ make

Usage

$ ./bin/shortly

Testing

$ make test

Linting

$ make lint

Docker compose

Supports docker-compose

Prometheus

Supported metrics:

  • shortly_http_request_count (Total number of requests by route)
  • shortly_http_request_seconds (Total amount of request time by route, in seconds)
  • shortly_error_count (Errors notification)

Grafana

Prometheus supported as datasource. Refer to ./grafana/provisioning/datasources/prometheus_ds.yml configuration file.

Alertmanager

Triggers upon alert of shortly_error_count with "internal" appears.

Important: Refer to ./prometheus/alertmanager.yml for setup of receiver.

Directories

Path Synopsis
cmd
internal
pkg

Jump to

Keyboard shortcuts

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