Sign inSign up

pagarme/watcher

By pagarme

Updated about 7 years ago

watcher for monitor applications

Image
0

313

pagarme/watcher repository overview

Watcher

:satellite: A small HTTP monitoring tool

Intro

As for now, watcher is tightly coupled on how autobahn works.

watcher is a monitoring tool that strives to monitor our PCI services. In order to do that, it creates authorization requests and send notifications if anything goes wrong.

In the future, we plan to offer more on metrics and integrations.

Usage

Check out in the table below the environment variables settings:

env varmandatorydescriptionexample
WATCHER_ENDPOINTyesWhich endpoint to watchhttp://localhost:8080
WATCHER_TIMEOUTyesRequest timeout in seconds10
WATCHER_TIMERyesDelay between each request in seconds1000
WATCHER_SLACK_HOOKENDPOINTyes (for now)Slack hook endpointhttps://hooks.slack.com/services/AZC/12354/ASzxca09
WATCHER_SLACK_USERNAMEnoSlack hook username that will be displayed."Watcher (TEST)"
WATCHER_SLACK_TEXTnoSlack hook text to be appended to the request response.":rotating_light: THIS IS A TEST :rotating_light:"
WATCHER_SLACK_ICONnoSlack hook emoji icon.":ghost:"

Obs: these variables are already defined with default values. For development purposes, if you want to change them, you can edit the docker-compose.yml file.

Development

Requirements
  • Docker (version 18 ow newer)
  • Docker-Compose (version 1.18.0 or newer)
How to Run

In order to run the project in your local environment, execute these two commands, as described below:

# As Golang itself requires the source code to be recompiled after every change,
# this first command will install the project dependencies + build the
# project's executable file.
docker-compose build --no-cache watcher

# Once the source code is recompiled and a new executable file is ready for
# action, it's time to execute it - and this command will do the trick ;)
docker-compose run --rm watcher
How to Stop

Execute the command in your terminal, at the project's root folder:

docker-compose down

Tag summary

Content type

Image

Digest

Size

5.1 MB

Last updated

about 7 years ago

docker pull pagarme/watcher