Hello,
I’m configuring services for my Centreon and I wanted to change format of my storage service.
I’ve already change something but I would like to make it better.
I’ve found in the linux plugin configuration where lines which display the result are.
My current conf for that :
15428 sub custom_usage_output {
15429 my ($self, %options) = @_;
15430 my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used});
15431 my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total});
15432 my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free});
15433 return sprintf(
15434 'Usage : %s / %s (%.2f%%)',
15435 $total_size_value . " " . $total_size_unit,
15436 $total_used_value . " " . $total_used_unit, $self->{result_values}->{prct_used},
15437 $total_free_value . " " . $total_free_unit, $self->{result_values}->{prct_free}
15438 );
15439 }
My main problem is that I would like to change my values order, I would like to have total used before total size (with %s).
I would also like to know if I can lined up that like an array.
Currently, it looks like that :
Thanks and have a nice day !