https://github.com/alexellis/hash-browns
Generate SHA256 hashes in Go with Prometheus metrics
https://github.com/alexellis/hash-browns
cloud-native golang metrics monitoring prometheus
Last synced: 30 days ago
JSON representation
Generate SHA256 hashes in Go with Prometheus metrics
- Host: GitHub
- URL: https://github.com/alexellis/hash-browns
- Owner: alexellis
- License: mit
- Created: 2017-03-18T17:17:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T01:47:49.000Z (over 2 years ago)
- Last Synced: 2025-04-27T06:52:33.329Z (about 1 month ago)
- Topics: cloud-native, golang, metrics, monitoring, prometheus
- Language: Go
- Homepage:
- Size: 293 KB
- Stars: 79
- Watchers: 6
- Forks: 24
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# hash-browns
This repository contains:
* A Quick-Start recipe for monitoring an application with Prometheus.
* A tiny web-server for creating SHA256 hashes with a /metrics endpoint> Read more on the related [blog post](http://blog.alexellis.io/prometheus-monitoring/)
### Get started
* Initialize Docker Swarm locally
```sh
docker swarm init
```* Deploy:
```sh
docker stack deploy tutorial --compose-file=./docker-compose.yml
```
* View logs:```sh
docker service logs tutorial_hashbrowns
```* View scrape targets
```sh
http://localhost:9090/targets
```* View the site:
http://127.0.0.1:8080/
* Invoke the service to generate some logs
```sh
curl -d test http://localhost:8080/hash
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
```* Open Prometheus:
http://127.0.0.1:9090/
View metrics such as `hash_seconds_sum` `hash_seconds_count` and `hash_seconds_bucket`
* Build the image (optional)
```sh
make docker push manifest
```### Notes for Raspberry PI:
A multi-arch Docker image is available, so you can use the same instructions.