https://github.com/nfaltir/go-uptime
⚡️ go api that checks web app uptime and latency. It saves data and visualize it.
https://github.com/nfaltir/go-uptime
go golang grafana python3 streamlit
Last synced: 3 months ago
JSON representation
⚡️ go api that checks web app uptime and latency. It saves data and visualize it.
- Host: GitHub
- URL: https://github.com/nfaltir/go-uptime
- Owner: nfaltir
- Created: 2025-03-19T09:33:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-19T10:03:32.000Z (over 1 year ago)
- Last Synced: 2025-03-19T10:38:05.063Z (over 1 year ago)
- Topics: go, golang, grafana, python3, streamlit
- Language: Go
- Homepage:
- Size: 699 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Site Uptime Monitor
A Go-based application to track website uptime and latency, with dashboards built using Streamlit and Grafana.
## Overview
This project monitors the uptime and latency of a web application, storing results in a SQLite database (`site_status.db`). It provides:
- A Go backend with an API endpoint (`/data`) serving JSON data.
- A Streamlit dashboard (Python) to visualize API data.
- A Grafana dashboard to analyze SQLite data with advanced tools.
## Project Setup
- create a `touch .env` file inside root folder
- inside the file create an environment variable called `targetURL=`
- run app `go run main.go`
- to run the frontend end you might need to create a python environemnt first, then start frontend server. `streamlit run app.py`
- to visuaize Grafana, you need to docker for installation.
## Features
### Streamlit Dashboard
- Built with the [Streamlit](https://streamlit.io/) Python framework.
- Visualizes JSON data from `http://localhost:8080/data` in a simple, interactive UI.
- Screenshot:

### Grafana Dashboard
- Uses [Grafana](https://grafana.com/), an open-source visualization platform.
- Connects to `site_status.db` for detailed metrics (e.g., latency trends, uptime stats).
- Requires Docker to run on port `3000`—see setup below.
- Screenshot:

## Golang API Endpoint
- localhost:8080/data
- Screenshot:

## Notes
Latency is relatively high—this is due to:
- The hosting server configuration.
- Rate-limiting on the monitored site.
- The app pings the server every 10 minutes to check if it's online.
- Future enhancements will include push notifications via Grafana alerting tools.