-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'support-bundle-simulated-implementation' into support-b…
…undle-bg-task
- Loading branch information
Showing
55 changed files
with
5,454 additions
and
628 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[package] | ||
name = "clickana" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MPL-2.0" | ||
|
||
[dependencies] | ||
anyhow.workspace = true | ||
camino.workspace = true | ||
chrono.workspace = true | ||
clap.workspace = true | ||
clickhouse-admin-types.workspace = true | ||
clickhouse-admin-server-client.workspace = true | ||
dropshot.workspace = true | ||
futures.workspace = true | ||
omicron-common.workspace = true | ||
ratatui.workspace = true | ||
schemars.workspace = true | ||
slog.workspace = true | ||
slog-async.workspace = true | ||
slog-dtrace.workspace = true | ||
slog-error-chain.workspace = true | ||
slog-term.workspace = true | ||
serde_json.workspace = true | ||
tokio.workspace = true | ||
tokio-postgres.workspace = true | ||
|
||
omicron-workspace-hack.workspace = true | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
use anyhow::Result; | ||
use camino::Utf8PathBuf; | ||
use clap::Parser; | ||
use clickana::Clickana; | ||
use std::net::SocketAddr; | ||
|
||
const CLICKANA_LOG_FILE: &str = "/tmp/clickana.log"; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let args = Cli::parse(); | ||
|
||
let terminal = ratatui::init(); | ||
let result = Clickana::new( | ||
args.clickhouse_addr, | ||
args.log_path, | ||
args.sampling_interval, | ||
args.time_range, | ||
args.refresh_interval, | ||
) | ||
.run(terminal) | ||
.await; | ||
ratatui::restore(); | ||
result | ||
} | ||
|
||
#[derive(Debug, Parser)] | ||
struct Cli { | ||
/// Path to the log file | ||
#[arg( | ||
long, | ||
short, | ||
env = "CLICKANA_LOG_PATH", | ||
default_value = CLICKANA_LOG_FILE, | ||
)] | ||
log_path: Utf8PathBuf, | ||
|
||
/// Address where a clickhouse admin server is listening on | ||
#[arg(long, short = 'a')] | ||
clickhouse_addr: SocketAddr, | ||
|
||
/// The interval to collect monitoring data in seconds | ||
#[arg(long, short, default_value_t = 60)] | ||
sampling_interval: u64, | ||
|
||
/// Range of time to collect monitoring data in seconds | ||
#[arg(long, short, default_value_t = 3600)] | ||
time_range: u64, | ||
|
||
/// The interval at which the dashboards will refresh | ||
#[arg(long, short, default_value_t = 60)] | ||
refresh_interval: u64, | ||
} |
Oops, something went wrong.