Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badger-finance/daowatch
https://github.com/badger-finance/daowatch
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/badger-finance/daowatch
- Owner: Badger-Finance
- Created: 2022-01-13T18:30:19.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T15:27:43.000Z (about 2 years ago)
- Last Synced: 2023-03-05T05:17:53.075Z (over 1 year ago)
- Language: Python
- Size: 468 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Badger Scout
Scout is an open-source version of the monitoring tool used by [Badger Finance](https://github.com/Badger-Finance) to watch simple ops metrics on our Ethereum smart contracts. Over time, community dashboards will be added.
Scout inspects each block on the chain, creates Badger-relevant events, and uses Grafana with Prometheus as the data source to store/display/work on them.
Included is a base set of UI-unchangeable dashboards configured by JSON that are used for alerting, and uses configuration as code wherever possible. Additional dashboards can be added by the community by making a pull request to add the JSON file into the `grafana/dashboards` directory structure.
All source code can be found in the `docker/` directory. The Badger-written Python collector can be found in `docker/scout`.
## Development Environment
The simplest way to get up and running is to run the below commands from this directory:
```bash
cd docker
export ETHNODEURL=https://ethnode.infra.example
export
docker-compose build
docker-compose up
```* Once running, access Grafana at localhost:3000, Prometheus at localhost:9090, Prometheus Scout target at localhost:8801.
* `docker-compose.yaml` contains environment variables to modify basic behavior.## Production Environment
Look in the `terraform/` directory to figure out how to build this out in the cloud. Terraform code is currently in the root directory because it is required to pull modules. However, it may later be split into a different repo.
The module is meant to work with network and load balancer resources provided by the DevOps4DeFi [terraform-baseline](https://github.com/DevOps4DeFi/terraform-baseline) module.
The `docker/build.sh` script is used to build the containers and push them to the Terraform ECR repos.
More documentation is still required.
## Grafana Dashboards
Look in the `grafana/provisioning/datasources` directory to see the data source that is used to access Prometheus. Note that it depends on an environment variable called `PROMETHEUS_URL`.
The dashboard structure is specified in the `grafana/dashboards` directory. This same directory structure will be shown in Grafana.
To make changes to these dashboards add/edit/remove the JSON files in this directory and redeploy Grafana with `docker-compose restart`. Dashboards can also be copied and edited in the Grafana console and exported as a JSON file to change/templatize.
Note that Grafana interpolates `${VAR}` as `VAR` environment variables from the YAML files in `grafana/provisioning/datasources`.