Commit 8d6a000f authored by PhiBo's avatar PhiBo 🚀
Browse files

src - Use dash(-) instead of underscore(_) in arguments

parent 58639c2e
...@@ -56,23 +56,23 @@ $mp->add_arg( ...@@ -56,23 +56,23 @@ $mp->add_arg(
); );
$mp->add_arg( $mp->add_arg(
spec => 'latency_warn=s', spec => 'latency-warn=s',
help => '', help => '',
); );
$mp->add_arg( $mp->add_arg(
spec => 'latency_crit=s', spec => 'latency-crit=s',
help => '', help => '',
); );
$mp->add_arg( $mp->add_arg(
spec => 'packet_loss_warn=s', spec => 'packet-loss-warn=s',
help => '', help => '',
); );
$mp->add_arg( $mp->add_arg(
spec => 'packet_loss_crit=s', spec => 'packet-loss-crit=s',
help => '', help => '',
); );
...@@ -161,26 +161,26 @@ sub check ...@@ -161,26 +161,26 @@ sub check
$hop_reachable = 1; $hop_reachable = 1;
$latency_status = $mp->check_threshold( $latency_status = $mp->check_threshold(
check => $latency_value, check => $latency_value,
warning => $mp->opts->latency_warn, warning => $mp->opts->get('latency-warn'),
critical => $mp->opts->latency_crit critical => $mp->opts->get('latency-crit'),
); );
$mp->add_perfdata( $mp->add_perfdata(
label => "hop_${hop_count}_rta", label => "hop_${hop_count}_rta",
value => $latency_value, value => $latency_value,
warning => $mp->opts->latency_warn, warning => $mp->opts->get('latency-warn'),
critical => $mp->opts->latency_crit, critical => $mp->opts->get('latency-crit'),
); );
$packet_loss_status = $mp->check_threshold( $packet_loss_status = $mp->check_threshold(
check => $packet_loss_value, check => $packet_loss_value,
warning => $mp->opts->packet_loss_warn, warning => $mp->opts->get('packet-loss-warn'),
critical => $mp->opts->packet_loss_crit, critical => $mp->opts->get('packet-loss-crit'),
); );
$mp->add_perfdata( $mp->add_perfdata(
label => "hop_${hop_count}_pl", label => "hop_${hop_count}_pl",
value => $packet_loss_value, value => $packet_loss_value,
warning => $mp->opts->packet_loss_warn, warning => $mp->opts->get('packet-loss-warn'),
critical => $mp->opts->packet_loss_crit, critical => $mp->opts->get('packet-loss-crit'),
); );
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment