Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mckael/checkupapi
API server for Sourcegraph checkup data
https://github.com/mckael/checkupapi
api-rest golang statuspage uptime-monitor
Last synced: 17 days ago
JSON representation
API server for Sourcegraph checkup data
- Host: GitHub
- URL: https://github.com/mckael/checkupapi
- Owner: McKael
- License: mit
- Created: 2017-08-26T22:00:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-26T22:36:47.000Z (over 7 years ago)
- Last Synced: 2024-10-29T13:56:05.141Z (2 months ago)
- Topics: api-rest, golang, statuspage, uptime-monitor
- Language: JavaScript
- Size: 95.7 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CheckupAPI
API server for Sourcegraph checkup data
[![godoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/McKael/checkupapi)
[![license](https://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/McKael/checkupapi/master/LICENSE)
[![build](https://img.shields.io/travis/McKael/checkupapi.svg?style=flat)](https://travis-ci.org/McKael/checkupapi)
[![Go Report Card](https://goreportcard.com/badge/github.com/McKael/checkupapi)](https://goreportcard.com/report/github.com/McKael/checkupapi)`checkupapi` is a [Go](https://golang.org/) REST API to access data generated by [checkup](https://github.com/sourcegraph/checkup).
## Purpose
The goal of checkupapi is to provide a common and efficient interface to read checkup's data without knowledge about checkup storage. Currently, the supported checkup storages are those that implement the StorageReader interface (FS, SQL and Github -- the Github backend has not been tested).
With checkupapi, getting an event timeline or statistics is very fast and does not require a heavy CPU load on the client side.
Please check the [API specifications](CheckupAPI.md) for more details.
## Installation
You can install the API server with the go command line tool:
% go get github.com/McKael/checkupapi
and ugrade it with
% go get -u github.com/McKael/checkupapi
## Usage
checkupapi can use the same configuration file as checkup.
The default port is 8801, you can change it with the `--http` command line flag.
E.g.:
% checkupapi -c /etc/checkup/checkup.json --http :8080
You can then query the API (see the API [endpoints](CheckupAPI.md)):
% curl localhost:8080/api/v1/check
OK 2017-08-26 10:25:06 +0200 CEST## Sample web status page
A status page, derived from checkup's one, has been included.
Instead of fetching results from checkup storage it does query the API to get event timeline and statistics. The API URL must be set in `js/config-api.js`.
## References
- [checkup](https://github.com/sourcegraph/checkup)