Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
389 changes: 389 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ axum = { version = "0.8.4", default-features = false, features = [
] }
clap = "4.5.46"
config = { version = "0.15.15", default-features = false, features = ["toml"] }
crossterm = "0.28"
env_logger = { version = "0.11.8", default-features = false, features = [
"auto-color",
] }
log = { version = "0.4.27", default-features = false }
ratatui = "0.29"
reqwest = { version = "0.12.22", default-features = false, features = [
"json",
"rustls-tls",
] }
serde = { version = "1.0.217", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.143", default-features = false }
thiserror = "2.0"
tokio = { version = "1.47.1", features = ["macros", "rt-multi-thread"] }
tokio = { version = "1.47.1", features = ["macros", "rt-multi-thread", "sync"] }

[profile.release]
opt-level = 'z'
Expand Down
74 changes: 72 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ cross-monitoring and ensure Fluxa itself remains up and running.

![fluxa >](https://raw.githubusercontent.com/rbas/fluxa/main/assets/fluxa.webp)

### Dashboard Mode

The interactive dashboard provides real-time monitoring with a clean terminal interface:

```
β”ŒStatus───────────────────────────────────────────────────────────────────────────────────┐
β”‚Fluxa Dashboard - Filter: All | Sort: Url | Services: 3 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”ŒMonitoredServices───────────────────────────────────────────────────────────────────────┐
β”‚URL Status Response Time Next Check Error β”‚
β”‚https://example.com Healthy 150.23ms 2m15s - β”‚
β”‚https://api.service.com Unhealthy N/A 5s HTTP 503: Serv… β”‚
β”‚https://backup.service.com Healthy 89.45ms 1m30s - β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”ŒHelp─────────────────────────────────────────────────────────────────────────────────────┐
β”‚q/Esc: Quit | f: Filter | s: Sort | ↑/k: Up | ↓/j: Down β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

*Dashboard showing real-time monitoring status with color-coded health indicators*

## πŸš€ Fluxa Features

* **Lightweight and Efficient:** Fluxa has very low RAM usage (in units of MB),
Expand All @@ -22,24 +43,73 @@ making it ideal for low-resource environments.
services like Uptime Kuma, but flexible enough to monitor any service by URL.
* **Minimal Footprint:** Fluxa is a small, reliable service designed to
run efficiently without consuming excessive resources.
* **Interactive Dashboard:** Real-time terminal UI dashboard showing service status,
response times, and monitoring progress with vim-like key bindings.
* **Dual Operation Modes:** Choose between headless mode for server deployments
or dashboard mode for interactive monitoring.

## πŸ›  Usage

Once **Fluxa** is installed and the configuration file is ready, you can run it
by executing the binary with the `--config` parameter, followed by the path
to your configuration file.

For example:
### Headless Mode (Default)

For headless monitoring with log output:

```shell
./fluxa --config /path/to/your/config.toml
```

This will start **Fluxa**, and it will begin monitoring the services defined in your
This will start **Fluxa** in headless mode, and it will begin monitoring the services defined in your
configuration file. Additionally, Fluxa's internal web server will be running
at the configured listen address (e.g., `127.0.0.1:8080`)
to allow cross-monitoring of *Fluxa* itself.

### Dashboard Mode

For interactive terminal dashboard monitoring:

```shell
./fluxa --config /path/to/your/config.toml --dashboard
```

Or using the short form:

```shell
./fluxa -c /path/to/your/config.toml -d
```

The dashboard mode provides a real-time terminal UI that displays:

- **All monitored URLs** with current status (Healthy/Unhealthy)
- **Response times** in milliseconds for successful requests
- **Next check countdown** showing when the next monitoring check will occur
- **Error messages** for failed requests or connectivity issues
- **Interactive filtering and sorting** options

#### Dashboard Key Bindings (Vim-style)

- **q** or **Esc**: Quit the dashboard
- **f**: Toggle filter modes (All β†’ Healthy Only β†’ Unhealthy Only β†’ All)
- **s**: Toggle sort modes (URL β†’ Status β†’ Response Time β†’ Next Check β†’ URL)
- **k** or **↑**: Move selection up
- **j** or **↓**: Move selection down

#### Filter Modes

- **All**: Show all monitored services
- **Healthy Only**: Show only services that are currently healthy
- **Unhealthy Only**: Show only services that are currently down or failing

#### Sort Modes

- **URL**: Sort alphabetically by service URL
- **Status**: Sort by health status (unhealthy services first)
- **Response Time**: Sort by response time (fastest first)
- **Next Check**: Sort by next check time (soonest first)

## πŸ“¦ Installation

You can install Fluxa in two ways: by downloading a pre-compiled binary
Expand Down
Loading