enh(generic-snmp): Some default values added

This commit is contained in:
David Boucher 2025-02-21 08:00:50 +01:00
parent 0a21a2e8fa
commit 9f5ce66506

View File

@ -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);
}