Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@avelor/mira

Continuous uptime monitor with automatic static status page.

Why Mira?

Mira (o Ceti) is a red giant variable star, one of the first variable stars ever discovered — observed continuously since 1596 by David Fabricius. Its brightness shifts dramatically over a ~332-day cycle: sometimes barely visible, sometimes among the brightest stars in the sky. Astronomers have watched it for centuries, recording every change.

A monitor that watches cycles, detects when something dims, and logs the history. The parallel is exact.

In Spanish, mira is the imperative of mirar: to look, to watch. "Míralo en Mira."

The mark is its light curve — the same pulse that astronomers have charted since 1596, rendered as a waveform.


Install

npm install -g @avelor/mira

Config

All config lives in a single file: ~/.config/mira/config.yml

It is created automatically on first run with commented examples. Edit it to add your endpoints and notification settings:

interval: 60s
incident_threshold: 3

notify:
  slack: "https://hooks.slack.com/..."
  # email:
  #   resend_key: re_...
  #   to: you@example.com

endpoints:
  - name: avelor.es
    url: https://avelor.es
    expect:
      status: 200
      contains: "Avelor"
    cert:
      warn_days: 30

  - name: API
    url: https://avelor.es/api/contact.php
    method: HEAD
    expect:
      status: 200

Usage

mira start        # start daemon
mira stop         # stop daemon
mira status       # daemon status + last result per endpoint
mira run          # one-shot check (CI mode)
mira logs         # show daemon logs
mira logs --tail  # follow daemon logs
mira page         # print path to status page

Status page

After each check cycle, Mira regenerates a static ~/.config/mira/public/index.html. Serve it however you like — nginx, Caddy, GitHub Pages, or just open it locally.

The page shows:

  • Global status header
  • Per-endpoint: latency, uptime %, cert expiry, last 90 checks as blocks
  • Incident history (click to expand)

No JavaScript. Pure HTML + CSS.

Incidents

An incident opens when N consecutive checks fail (default incident_threshold: 3). It resolves automatically when a check passes. You get exactly two notifications per incident: when it opens and when it closes (with duration).

License

MIT

About

Lightweight uptime monitor with daemon, NDJSON event store, and auto-generated static status page. No cloud, no dashboard — just a binary

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages