Compare commits

..

No commits in common. "b03b64c7ed46ee3091b499bfce6616662728f044" and "1da003dc2874bed0a3ce341699b7393c3dcd3ebd" have entirely different histories.

9 changed files with 14 additions and 20 deletions

5
.tci
View file

@ -1,5 +0,0 @@
#!/bin/sh
cargo build --release
systemctl --user stop upp
cat target/release/upp > /opt/bin/upp
systemctl --user start upp

2
Cargo.lock generated
View file

@ -1392,7 +1392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "upp"
name = "uppe-rs"
version = "0.2.0"
dependencies = [
"async-recursion",

View file

@ -1,5 +1,5 @@
[package]
name = "upp"
name = "uppe-rs"
version = "0.2.0"
edition = "2021"

View file

@ -1,10 +1,10 @@
# upp
# uppe.rs
> batteries-included uptime monitor for your infrastructure
`upp` runs off a single binary, a configuration file (in toml) and an sqlite database (can be in memory or persisted on disk), and provides a daemon that tests configured routes while also serving a tiny API and web frontend.
`uppe.rs` runs off a single binary, a configuration file (in toml) and an sqlite database (can be in memory or persisted on disk), and provides a daemon that tests configured routes while also serving a tiny API and web frontend.
it periodically makes requests to configured services, and tracks roundtrip time (or if no response was returned at all!). this data is then accessible using `upp` tiny builtin api, and can be viewed on the integrated webpage (served on service's `/`)
it periodically makes requests to configured services, and tracks roundtrip time (or if no response was returned at all!). this data is then accessible using `uppe.rs` tiny builtin api, and can be viewed on the integrated webpage (served on service's `/`)
as an example, check out my instance on [up.alemi.dev](https://up.alemi.dev)
@ -21,4 +21,4 @@ future features which would be nice to add are:
* multi-protocol endpoint tester
## name
small but not really specific, `uprs` and `up-rs` and `up` were taken. if you have better name ideas let me know c:
honestly pretty bad, probably a mix of uptime + rust + monitors + stimulants. send me better ideas plz, contacts on my site

View file

@ -13,7 +13,7 @@ pub async fn serve(config: Config, db: Database, addr: &str) -> std::io::Result<
let app = axum::Router::new()
.route("/", axum::routing::get(|| async { Html(index) }))
.route("/favicon.ico", axum::routing::get(|| async { include_bytes!("../web/upp.ico") }))
.route("/favicon.ico", axum::routing::get(|| async { include_bytes!("../web/uppe.ico") }))
.route("/api/status", axum::routing::get(api_status))
.route("/api/status/:service", axum::routing::get(api_status_service))
.with_state(db);

View file

@ -15,7 +15,7 @@ struct Cli {
storage: Option<String>,
/// path to config file
#[arg(short, long, default_value = "upp.toml")]
#[arg(short, long, default_value = "uppe.toml")]
config: String,
/// host to bind api onto

View file

@ -1,6 +1,5 @@
interval_s = 10
batchsize = 100
description = "keeping track of your infra status"
history = 600
[service.moonlit]
endpoint = "https://moonlit.technology"
@ -8,7 +7,7 @@ endpoint = "https://moonlit.technology"
[service.site]
endpoint = "https://alemi.dev"
[service."code.mp"]
[service.codemp]
endpoint = "https://code.mp"
[service.down]

View file

@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link crossorigin rel="stylesheet" href="https://cdn.alemi.dev/web/alemi.css">
<title>up.rs</title>
<title>uppe.rs</title>
<style>
span.cell {
position: relative;
@ -109,12 +109,12 @@
<body>
<div class="content">
<div class="ml-1">
<h1 class="mt-0 pt-1">up.rs</h1>
<h1 class="mt-0 pt-1">uppe.rs</h1>
<p>%%DESCRIPTION%%</p>
</div>
<hr class="color"/>
<main id="upp-content">
<main id="uppe-rs-content">
<h2 class="center mt-3">loading<span class="dots"></span></h2>
</main>
</div>
@ -164,7 +164,7 @@ function card(key, history, last_rtt) {
</div>`;
}
const main = document.getElementById("upp-content");
const main = document.getElementById("uppe-rs-content");
const batchsize = (new URLSearchParams(window.location.search)).get('batch') || '%%BATCHSIZE%%';
async function updateStatus() {

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB