Compare commits
2 commits
1da003dc28
...
b03b64c7ed
Author | SHA1 | Date | |
---|---|---|---|
b03b64c7ed | |||
ec7632dff1 |
9 changed files with 20 additions and 14 deletions
5
.tci
Executable file
5
.tci
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cargo build --release
|
||||||
|
systemctl --user stop upp
|
||||||
|
cat target/release/upp > /opt/bin/upp
|
||||||
|
systemctl --user start upp
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1392,7 +1392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uppe-rs"
|
name = "upp"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-recursion",
|
"async-recursion",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uppe-rs"
|
name = "upp"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# uppe.rs
|
# upp
|
||||||
|
|
||||||
> batteries-included uptime monitor for your infrastructure
|
> batteries-included uptime monitor for your infrastructure
|
||||||
|
|
||||||
`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.
|
`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.
|
||||||
|
|
||||||
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 `/`)
|
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 `/`)
|
||||||
|
|
||||||
as an example, check out my instance on [up.alemi.dev](https://up.alemi.dev)
|
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
|
* multi-protocol endpoint tester
|
||||||
|
|
||||||
## name
|
## name
|
||||||
honestly pretty bad, probably a mix of uptime + rust + monitors + stimulants. send me better ideas plz, contacts on my site
|
small but not really specific, `uprs` and `up-rs` and `up` were taken. if you have better name ideas let me know c:
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub async fn serve(config: Config, db: Database, addr: &str) -> std::io::Result<
|
||||||
|
|
||||||
let app = axum::Router::new()
|
let app = axum::Router::new()
|
||||||
.route("/", axum::routing::get(|| async { Html(index) }))
|
.route("/", axum::routing::get(|| async { Html(index) }))
|
||||||
.route("/favicon.ico", axum::routing::get(|| async { include_bytes!("../web/uppe.ico") }))
|
.route("/favicon.ico", axum::routing::get(|| async { include_bytes!("../web/upp.ico") }))
|
||||||
.route("/api/status", axum::routing::get(api_status))
|
.route("/api/status", axum::routing::get(api_status))
|
||||||
.route("/api/status/:service", axum::routing::get(api_status_service))
|
.route("/api/status/:service", axum::routing::get(api_status_service))
|
||||||
.with_state(db);
|
.with_state(db);
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct Cli {
|
||||||
storage: Option<String>,
|
storage: Option<String>,
|
||||||
|
|
||||||
/// path to config file
|
/// path to config file
|
||||||
#[arg(short, long, default_value = "uppe.toml")]
|
#[arg(short, long, default_value = "upp.toml")]
|
||||||
config: String,
|
config: String,
|
||||||
|
|
||||||
/// host to bind api onto
|
/// host to bind api onto
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
interval_s = 10
|
interval_s = 10
|
||||||
history = 600
|
batchsize = 100
|
||||||
|
description = "keeping track of your infra status"
|
||||||
|
|
||||||
[service.moonlit]
|
[service.moonlit]
|
||||||
endpoint = "https://moonlit.technology"
|
endpoint = "https://moonlit.technology"
|
||||||
|
@ -7,7 +8,7 @@ endpoint = "https://moonlit.technology"
|
||||||
[service.site]
|
[service.site]
|
||||||
endpoint = "https://alemi.dev"
|
endpoint = "https://alemi.dev"
|
||||||
|
|
||||||
[service.codemp]
|
[service."code.mp"]
|
||||||
endpoint = "https://code.mp"
|
endpoint = "https://code.mp"
|
||||||
|
|
||||||
[service.down]
|
[service.down]
|
|
@ -4,7 +4,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link crossorigin rel="stylesheet" href="https://cdn.alemi.dev/web/alemi.css">
|
<link crossorigin rel="stylesheet" href="https://cdn.alemi.dev/web/alemi.css">
|
||||||
<title>uppe.rs</title>
|
<title>up.rs</title>
|
||||||
<style>
|
<style>
|
||||||
span.cell {
|
span.cell {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -109,12 +109,12 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ml-1">
|
<div class="ml-1">
|
||||||
<h1 class="mt-0 pt-1">uppe.rs</h1>
|
<h1 class="mt-0 pt-1">up.rs</h1>
|
||||||
<p>%%DESCRIPTION%%</p>
|
<p>%%DESCRIPTION%%</p>
|
||||||
</div>
|
</div>
|
||||||
<hr class="color"/>
|
<hr class="color"/>
|
||||||
|
|
||||||
<main id="uppe-rs-content">
|
<main id="upp-content">
|
||||||
<h2 class="center mt-3">loading<span class="dots"></span></h2>
|
<h2 class="center mt-3">loading<span class="dots"></span></h2>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -164,7 +164,7 @@ function card(key, history, last_rtt) {
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const main = document.getElementById("uppe-rs-content");
|
const main = document.getElementById("upp-content");
|
||||||
const batchsize = (new URLSearchParams(window.location.search)).get('batch') || '%%BATCHSIZE%%';
|
const batchsize = (new URLSearchParams(window.location.search)).get('batch') || '%%BATCHSIZE%%';
|
||||||
|
|
||||||
async function updateStatus() {
|
async function updateStatus() {
|
||||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in a new issue