commit
5cfdf0615d
|
@ -84,9 +84,17 @@ sub custom_status_calc {
|
||||||
|
|
||||||
$self->{result_values}->{rawtype} = $options{new_datas}->{$self->{instance} . '_type'};
|
$self->{result_values}->{rawtype} = $options{new_datas}->{$self->{instance} . '_type'};
|
||||||
$self->{result_values}->{rawstate} = $options{new_datas}->{$self->{instance} . '_state'};
|
$self->{result_values}->{rawstate} = $options{new_datas}->{$self->{instance} . '_state'};
|
||||||
$self->{result_values}->{type} = $type_map_chronyc{$options{new_datas}->{$self->{instance} . '_type'}};
|
if ($self->{instance_mode}->{option_results}->{command} eq 'ntpq') {
|
||||||
|
$self->{result_values}->{type} = $type_map_ntpq{$options{new_datas}->{$self->{instance} . '_type'}};
|
||||||
|
} else {
|
||||||
|
$self->{result_values}->{type} = $type_map_chronyc{$options{new_datas}->{$self->{instance} . '_type'}};
|
||||||
|
}
|
||||||
$self->{result_values}->{reach} = $options{new_datas}->{$self->{instance} . '_reach'};
|
$self->{result_values}->{reach} = $options{new_datas}->{$self->{instance} . '_reach'};
|
||||||
$self->{result_values}->{state} = $state_map_chronyc{$options{new_datas}->{$self->{instance} . '_state'}};
|
if ($self->{instance_mode}->{option_results}->{command} eq 'ntpq') {
|
||||||
|
$self->{result_values}->{state} = $state_map_ntpq{$options{new_datas}->{$self->{instance} . '_state'}};
|
||||||
|
} else {
|
||||||
|
$self->{result_values}->{state} = $state_map_chronyc{$options{new_datas}->{$self->{instance} . '_state'}};
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue