Files
atalaya/README.md
T

93 lines
3.5 KiB
Markdown

# Atalaya Uptime Monitor
[![CI](https://github.com/dcarrillo/atalaya/actions/workflows/ci.yml/badge.svg)](https://github.com/dcarrillo/atalaya/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](https://nodejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-6.0-blue.svg)](https://www.typescriptlang.org/)
[![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-orange.svg)](https://workers.cloudflare.com/)
[![Astro](https://img.shields.io/badge/Astro-6.0-purple.svg)](https://astro.build/)
Atalaya (Spanish for watchtower) is an uptime & status page monitoring service running on Cloudflare Workers and Durable Objects.
It runs entirely on Cloudflare's free tier, so you get a self-hosted uptime monitor and status page without paying for servers. It's aimed at hobbyists who want control over their monitoring and don't mind living inside Cloudflare's ecosystem.
Live [example](https://uptime.ifconfig.es/).
:warning: 99% of the code has been generated by an AI agent under human supervision, bearing in mind that I haven't used TypeScript before. You have been warned!
```ASCII
🏴‍☠️
|
_ _|_ _
|;|_|;|_|;|
\\. . /
\\: . /
||: |
||:. |
||: .|
||: , |
||: |
||: . |
_||_ |
__ ----~ ~`---,
__ ,--~' ~~----____
```
## Features
- HTTP/HTTPs, TCP, and DNS monitoring.
- Regional monitoring from specific Cloudflare locations.
- Configurable retries with immediate retry on failure.
- Configurable failure thresholds before alerting.
- Custom alert templates for notifications (currently only webhooks are supported).
- Historical data stored in Cloudflare D1.
- Status page built with Astro 6 SSR, served by the same Worker via Static Assets.
- 90-day uptime history with daily bars.
- Response time charts (uPlot) with downtime bands.
- Basic auth or public access modes.
- Dark/light mode.
- Custom banner image support with optional clickable link.
## Documentation
Read the [docs](https://atalaya-docs.dcarrillo.es/) for [setup](https://atalaya-docs.dcarrillo.es/getting-started/), [configuration](https://atalaya-docs.dcarrillo.es/configuration/), [alerts](https://atalaya-docs.dcarrillo.es/configuration/#alerts), and more.
## Development
```bash
# Run worker locally
wrangler dev --test-scheduled
# Run status page locally
pnpm dev:pages
# Trigger cron manually
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
```
### Testing
```bash
# First build the status page
pnpm build:pages
# Worker tests
pnpm test
# Status page unit tests
pnpm test:pages
# Type checking and linting
pnpm check # worker (typecheck + lint + format)
pnpm check:pages # pages (astro check + tsc + lint)
```
## TODO
- [ ] Add support for TLS checks (certificate validity, expiration). Apparently, the Workers API does not support certificate data access, even at the socket level. An external service may be required.
- [ ] Refine the status page to look... well... less AI-generated.
- [x] Per-monitor maintenance windows
- [ ] Initial support for incident management (manual status overrides, incident timeline).
- [x] Branded status page (simple custom banner).
- [ ] Add support for notifications other than webhooks.