Skip to content

Alert microservice to query an trigger user alerts when new sensor data is received

License

Notifications You must be signed in to change notification settings

hidromatologia-v2/alerts

Repository files navigation

alerts

Coverage Release Tagging Test codecov Go Report Card GitHub go.mod Go version

Documentation

Document Description
CONTRIBUTING.md Contribution manual.
CICD.md CI/CD documentation.

Docker

docker pull ghcr.io/hidromatologia-v2/alerts:latest

Compose example

docker compose up -d

Binary

You can use the binary present in Releases. Or compile your own with.

go install github.com/hidromatologia-v2/alerts@latest

Config

List of environment variables used by the binary. Make sure to setup them as well in your deployments

Variable Description Example
MEMPHIS_CONSUMER_STATION Name for the station to CREATE/CONNECT alerts
MEMPHIS_CONSUMER_CONSUMER Alerts consumer name alerts-consumer
MEMPHIS_CONSUMER_HOST Host or IP of the Memphis service 10.10.10.10
MEMPHIS_CONSUMER_USERNAME Memphis Username root
MEMPHIS_CONSUMER_PASSWORD Memphis password, if ignored MEMPHIS_CONSUMER_CONN_TOKEN will be used memphis
MEMPHIS_CONSUMER_CONN_TOKEN Memphis connection token, if ignored MEMPHIS_CONSUMER_PASSWORD will be used ABCD
MEMPHIS_PRODUCER_STATION Name for the station to CREATE/CONNECT messages
MEMPHIS_PRODUCER_PRODUCER Messages producer name `messages-producer
MEMPHIS_PRODUCER_HOST Host or IP of the Memphis service 10.10.10.10
MEMPHIS_PRODUCER_USERNAME Memphis Username root
MEMPHIS_PRODUCER_PASSWORD Memphis password, if ignored MEMPHIS_PRODUCER_CONN_TOKEN will be used memphis
MEMPHIS_PRODUCER_CONN_TOKEN Memphis connection token, if ignored MEMPHIS_PRODUCER_PASSWORD will be used ABCD
POSTGRES_DSN Postgres DSN to be used host=127.0.0.1 user=sulcud password=sulcud dbname=sulcud port=5432 sslmode=disable

Coverage

coverage coverage