mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 13:45:18 +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)]
|
||||
struct Cli {
|
||||
/// Hostname to operate on
|
||||
#[arg(long, short = 'H')]
|
||||
#[arg(long, short = 'H', default_value = "localhost")]
|
||||
hostname: String,
|
||||
|
||||
#[arg(long, short, default_value_t = 161)]
|
||||
port: u16,
|
||||
|
||||
#[arg(long, short = 'v')]
|
||||
#[arg(long, short = 'v', default_value = "2c")]
|
||||
snmp_version: String,
|
||||
|
||||
#[arg(long, short)]
|
||||
#[arg(long, short, default_value = "public")]
|
||||
community: String,
|
||||
|
||||
#[arg(long, short)]
|
||||
@ -70,7 +70,7 @@ fn main() {
|
||||
warning_agregation: cli.warning_agregation,
|
||||
critical_agregation: cli.critical_agregation,
|
||||
};
|
||||
let result = cmd.execute(&url, &ext);
|
||||
let result = cmd.execute(&url, &cli.community, &ext);
|
||||
println!("{}", result.output);
|
||||
std::process::exit(result.status);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user