mirror of
				https://github.com/centreon/centreon-plugins.git
				synced 2025-10-31 11:23:50 +01:00 
			
		
		
		
	Fix some errors in Solaris local mode
This commit is contained in:
		
							parent
							
								
									4a151d32b8
								
							
						
					
					
						commit
						f5092350b1
					
				| @ -117,7 +117,8 @@ sub run { | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     my ($exit_code) = check_threshold($volumes_errors, $OPTION{warning}, $OPTION{critical}); | ||||
|     my ($exit_code) = $self->{perfdata}->threshold_check(value => $volumes_errors,  | ||||
|                                                          threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);  | ||||
|     if ($volumes_errors > 0) { | ||||
|         $self->{output}->output_add(severity => $exit_code, | ||||
|                                     short_msg => sprintf("Some volumes problems:" . $volumes)); | ||||
|  | ||||
| @ -61,7 +61,7 @@ sub new { | ||||
|                                   "sudo"              => { name => 'sudo' }, | ||||
|                                   "command:s"         => { name => 'command', default => 'prtdiag' }, | ||||
|                                   "command-path:s"    => { name => 'command_path', default => '/usr/platform/`/sbin/uname -i`/sbin' }, | ||||
|                                   "command-options:s" => { name => 'command_options', default => '-v 2&1' }, | ||||
|                                   "command-options:s" => { name => 'command_options', default => '-v 2>&1' }, | ||||
|                                   "config-file:s"     => { name => 'config_file' }, | ||||
|                                 }); | ||||
|     $self->{conf} = {}; | ||||
| @ -266,6 +266,7 @@ sub prtdiag { | ||||
| sub run { | ||||
|     my ($self, %options) = @_; | ||||
| 
 | ||||
|     $self->load_prtdiag_config(); | ||||
|     $self->prtdiag(); | ||||
|     $self->{output}->display(); | ||||
|     $self->{output}->exit(); | ||||
|  | ||||
| @ -160,10 +160,10 @@ sub run { | ||||
|     my ($exit_code) = $self->{perfdata}->threshold_check(value => $num_metastat_errors,  | ||||
|                                                          threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);  | ||||
|     if ($num_metastat_errors > 0) { | ||||
|         output_add(severity => $exit_code, | ||||
|         $self->{output}->output_add(severity => $exit_code, | ||||
|                                     short_msg => sprintf("Some metadevices need maintenance:" . $metastat_name)); | ||||
|     } else { | ||||
|         output_add(severity => 'OK',  | ||||
|         $self->{output}->output_add(severity => 'OK',  | ||||
|                                     short_msg => "No problems on metadevices"); | ||||
|     } | ||||
|      | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user