Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorgechato/ferula-communis
A demo of a GO web service build with gorilla/mux and monitored with prometheus
https://github.com/jorgechato/ferula-communis
Last synced: 7 days ago
JSON representation
A demo of a GO web service build with gorilla/mux and monitored with prometheus
- Host: GitHub
- URL: https://github.com/jorgechato/ferula-communis
- Owner: jorgechato
- License: apache-2.0
- Created: 2017-11-27T20:30:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-22T11:22:40.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T06:34:43.263Z (5 months ago)
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go web service monitored with prometheus
[![Go Report Card](https://goreportcard.com/badge/github.com/jorgechato/ferula-communis)](https://goreportcard.com/report/github.com/jorgechato/ferula-communis)A demo of a GO web service build with gorilla/mux and monitored with prometheus
## Manual Installation & Run
### Web service
```zsh
$ docker build -t ferula-communis .
$ docker run -d -p 8080:8080 --name ferula-communis_web ferula-communis
```### Set prometheus
Write your own Prometheus configuration to scrape itself. Use the following yaml or crate one yourself:```yaml
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'ferula-communis'
scrape_interval: 5s
static_configs:
- targets: ['ferula-communis_web:8080']
```Mount that configuration file in a Docker volume and run Prometheus again:
```zsh
$ docker run -d -p 9090:9090 -v ${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml --name prometheus prom/prometheus
```### Set Grafana
```zsh
$ docker run -d -p 3000:3000 --name=grafana -e "GF_SECURITY_ADMIN_PASSWORD=pass" grafana/grafana
```## With docker-compose
```zsh
$ docker-compose up -d
```