rmateu / statuspage

Web properties status.
https://status.mateu.me
MIT License
0 stars 0 forks source link
status-page upptime uptime-monitor

πŸ“ˆ Live Status: 🟩 All systems operational

Upptime (https://upptime.js.org) is the open-source uptime monitor and status page, powered entirely by GitHub Actions and Issues.

Static Site CI Graphs CI Response Time CI Summary CI Uptime CI

URL Status History Response Time Uptime
5typos.ne Blog 🟩 Up 5typos-ne-blog.yml
Response time graph 521ms
Response time 568
24-hour response time 546
7-day response time 521
30-day response time 517
1-year response time 548
100.00%All-time uptime 99.79%
24-hour uptime 100.00%
7-day uptime 100.00%
30-day uptime 100.00%
1-year uptime 99.51%
Statuslog 🟩 Up statuslog.yml
Response time graph 843ms
Response time 720
24-hour response time 620
7-day response time 843
30-day response time 909
1-year response time 720
99.75%All-time uptime 99.72%
24-hour uptime 98.22%
7-day uptime 99.75%
30-day uptime 99.30%
1-year uptime 99.72%
Personal Page 🟩 Up personal-page.yml
Response time graph 273ms
Response time 317
24-hour response time 330
7-day response time 273
30-day response time 227
1-year response time 317
100.00%All-time uptime 100.00%
24-hour uptime 100.00%
7-day uptime 100.00%
30-day uptime 100.00%
1-year uptime 100.00%
Ana's Blog 🟩 Up ana-s-blog.yml
Response time graph 199ms
Response time 558
24-hour response time 162
7-day response time 199
30-day response time 368
1-year response time 430
100.00%All-time uptime 99.94%
24-hour uptime 100.00%
7-day uptime 100.00%
30-day uptime 100.00%
1-year uptime 100.00%

⭐ How it works

Screenshot of status website

πŸ’ Who's using Upptime

Shulert
status.shulert.com
Koj
status.koj.co
Wakatime
status.wakatime.com
Stethoscope
stethoscope.js.org/status
Coinsamba
https://status.coinsamba.com/

You too? Open a PR!

πŸ‘©β€πŸ’» Getting started

  1. Create a new repository using this template
  2. Update the .upptimerc.yml file with your configuration
  3. Enable publishing the gh-pages branch for your status website and add a GH_PAT

Concepts

Issues as incidents

When the GitHub Actions workflow detects that one of your URLs is down, it automatically opens a GitHub issue (example issue #15). You can add incident reports to this issue by adding comments. When your site comes back up, the issue will be closed automatically as well.

Screenshot of GitHub issue Screenshot of incident page

Commits for response time

Four times per day, another workflow runs and records the response time of your websites. This data is commited to GitHub, so it's available in the commit history of each file (example commit history). Then, the GitHub API is used to graph the response time history of each endpoint and to track when a site went down.

Screenshot of GitHub commits Screenshot of live status

Configuration

The .upptimerc.yml file is used as the central configuration for Upptime, with this syntax:

owner: koj-co # GitHub username
repo: upptime # GitHub repository name
user-agent: koj-co
sites: # List of endpoints to track
  - name: Google
    url: https://www.google.com
assignees: # Users to assign downtime issues (optional)
  - AnandChowdhary
status-website: # Status website (optional)
  cname: upptime.js.org # Custom domain CNAME
  name: Upptime # Status website title

Repository

A GitHub repository is used as the "source of truth" for your uptime logs, and the static site uses the GitHub API and fetches data from this repository.

After you've created a new repository using this template (see Creating a repository from a template), specify the username and repository name in the configuration:

owner: koj-co
repo: upptime

Endpoints

You can track as many websites as you like. Add the names and URLs of your endpoints in the sites key:

sites:
  - name: Google
    url: https://www.google.com
  - name: DuckDuckGo
    url: https://duckduckgo.com

To make POST requests (or any other HTTP verb), you can add the method key:

sites:
  - name: POST to Google
    url: https://www.google.com
    method: POST
  - name: DELETE Example
    url: https://example.com
    method: DELETE

If you don't want to show a URL publicly, you can use repository secrets (see Creating and storing encrypted secrets). Instead of the plain text URL, add the name of the secret prefixed with a $ character:

- name: Secret Site
  url: $SECRET_SITE

In the above example, a secret named SECRET_SITE (without the $) is stored in the repository. Note that you'll also have to add this secret as an environment variable in each workflow file in .github/workflows:

# Example: .github/workflows/graphs.yml
# ...
- name: Run script
  run: npm run graphs
  env:
    SECRET_SITE: ${{ secrets.SECRET_SITE }} # Add your repository secret

User agent

Requests made to the GitHub API must include a valid User-Agent header (see User Agent required). It is recommended to use your GitHub username here:

user-agent: your-github-username

Notifications

You can add services to send downtime notifications to. Currently, only Slack notifications are supported.

Slack

Use slack as the type and provide a Slack channel ID as channel in the configuration.

notifications:
  - type: slack
    channel: C01XQ3U9M9P

A Slack App has to be registered and installed prior to usage, with the scope chat:write (see chat.postMessage docs), and the environment variable SLACK_APP_ACCESS_TOKEN should be set with the Slack Bot User OAuth Access Token. You can use GitHub Secrets to add it.

Assignees

You can add members of your team to be assigned to every downtime issue:

assignees:
  - AnandChowdhary
  - CarloBadini

If you want particular users to be assigned per-site, you can add assignees under each entry in sites:

sites:
  - name: Google
    url: https://www.google.com
    assignees:
      - AnandChowdhary

Branding

A static website with PWA is also generated, and you can customize the logo and name in the navbar:

status-website:
  name: Upptime
  logoUrl: https://example.com/image.jpg

If you want to add a custom domain, you can add the cname key:

status-website:
  name: Upptime
  logoUrl: https://example.com/image.jpg
  cname: upptime.js.org # Custom CNAME

Intro text

Optionally, you can add some introductory text to the website. You can use Markdown:

status-website:
  introTitle: "**Upptime** is the open-source uptime monitor and status page, powered entirely by GitHub."
  introMessage: This is a sample status page which uses **real-time** data from our [Github repository](https://github.com/koj-co/upptime). No server required β€” just GitHub Actions, Issues, and Pages.

Site deployment

Because GitHub Pages does not support the default GITHUB_TOKEN available to workflows, you'll have to set a secret GH_PAT with a Personal Access Token. For more info, see: https://github.com/maxheld83/ghpages#secrets.

Internationalization

Though our status page is in English, you can use any language with Upptime by supplying the required strings. The list of all required strings is available in site/i18n.yml, and you can add them under the i18n key in the configuration file:

i18n:
  activeIncidents: Incidentes activos
  allSystemsOperational: Todos los sistemas estΓ‘n operativos
  # ...

Updating

This template is updated from time to time, so you can use the update-template command to sync the changes from this GitHub repository template:

npm run update-template

Badges

You can use the Shields.io service with the API endpoint generated by your repository's api directory. For example, the URL https://raw.githubusercontent.com/koj-co/upptime/master/api/google/uptime.json has the following JSON schema:

{
  "schemaVersion": 1,
  "label": "uptime",
  "message": "100%",
  "color": "brightgreen"
}

This translates to this badge: Uptime

![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fkoj-co%2Fupptime%2Fmaster%2Fapi%2Fgoogle%2Fuptime.json)

Similarly, response time badges are available: Response time

![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fkoj-co%2Fupptime%2Fmaster%2Fapi%2Fgoogle%2Fresponse-time.json)

πŸ“„ License

Koj

An open source project by Koj.
Furnish your home in style, for as low as CHF175/month β†’