Crates.io | ftdc |
lib.rs | ftdc |
version | 0.1.4 |
source | src |
created_at | 2021-11-06 17:10:37.972422 |
updated_at | 2023-09-07 18:18:41.895451 |
description | Crate to download ftdc data for mongodb clusters. |
homepage | |
repository | https://github.com/maoertel/mongodb-ftdc |
max_upload_size | |
id | 477729 |
size | 75,884 |
Lib crate to enable your application to download Full Time Diagnostic Data Capture (FTDC) data from mongodb clusters to investigate deeper (e.g. keyhole).
To download FTDC data from a mongodb cluster you need to provide some input to the CLI:
cloud.mongodb.com/v2/{group key}/clusters
)atlas-<something>-shard-0
) or the name of the shard (e.g some-name-shard-00
). Do not forget the number here as it qualifies the shard in case you want data from a sharded cluster. For a standalone replica set it is 00
but lets say for a sharded cluster with 3 shards it would be 00
, 01
, 02
.use error::Error;
use reqwest::Client;
use service::{FtdcDataService, FtdcLoader};
#[tokio::main]
async fn main() -> Result<(), Error> {
let group_key = "...";
let replica_set_name = "...";
let size = 10_000_000
let public = "...";
let private = "...";
let service = FtdcDataService { client: Client::new() };
service
.get_ftdc_data(
group_key,
replica_set_name,
size,
public,
private,
)
.await
.map(|download_path| println!("Downloaded to: `{download_path}`"))
}
The data is downloaded to the current directory the application was executed in as a *.tar.gz
file.