34 lines
2 KiB
Rust
34 lines
2 KiB
Rust
/********************************************************************************
|
|
* Prometheus exporter for monitoring network connectivity using icmp pings *
|
|
* *
|
|
* Copyright (C) 2019-2022 Jan Christian Grünhage *
|
|
* Copyright (C) 2020-2021 Famedly GmbH *
|
|
* *
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
* License, or (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU Affero General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
********************************************************************************/
|
|
use clap::ValueHint;
|
|
|
|
#[derive(clap::Parser)]
|
|
#[clap(author, version)]
|
|
/// Pings configured hosts in a configurable intervals and exposes metrics for prometheus.
|
|
pub struct Cli {
|
|
/// Set config file
|
|
#[clap(value_hint = ValueHint::FilePath)]
|
|
pub config: std::path::PathBuf,
|
|
#[clap(short, long, parse(from_occurrences))]
|
|
/// Be verbose (you can add this up to 4 times for more logs).
|
|
/// By default, only errors are logged, so no output is a good thing.
|
|
pub verbose: usize,
|
|
}
|