mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 14:44:43 +02:00
enh(generic-snmp): Some default values added
This commit is contained in:
parent
0a21a2e8fa
commit
9f5ce66506
@ -20,16 +20,16 @@ use std::fs;
|
|||||||
#[command(version, about)]
|
#[command(version, about)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
/// Hostname to operate on
|
/// Hostname to operate on
|
||||||
#[arg(long, short = 'H')]
|
#[arg(long, short = 'H', default_value = "localhost")]
|
||||||
hostname: String,
|
hostname: String,
|
||||||
|
|
||||||
#[arg(long, short, default_value_t = 161)]
|
#[arg(long, short, default_value_t = 161)]
|
||||||
port: u16,
|
port: u16,
|
||||||
|
|
||||||
#[arg(long, short = 'v')]
|
#[arg(long, short = 'v', default_value = "2c")]
|
||||||
snmp_version: String,
|
snmp_version: String,
|
||||||
|
|
||||||
#[arg(long, short)]
|
#[arg(long, short, default_value = "public")]
|
||||||
community: String,
|
community: String,
|
||||||
|
|
||||||
#[arg(long, short)]
|
#[arg(long, short)]
|
||||||
@ -70,7 +70,7 @@ fn main() {
|
|||||||
warning_agregation: cli.warning_agregation,
|
warning_agregation: cli.warning_agregation,
|
||||||
critical_agregation: cli.critical_agregation,
|
critical_agregation: cli.critical_agregation,
|
||||||
};
|
};
|
||||||
let result = cmd.execute(&url, &ext);
|
let result = cmd.execute(&url, &cli.community, &ext);
|
||||||
println!("{}", result.output);
|
println!("{}", result.output);
|
||||||
std::process::exit(result.status);
|
std::process::exit(result.status);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user