mirror of
				https://github.com/centreon/centreon-plugins.git
				synced 2025-10-31 03:13:49 +01:00 
			
		
		
		
	enh(pacemaker/local): mode crm - modify nodes online/offline regexp (#3347)
This commit is contained in:
		
							parent
							
								
									88ad48fa73
								
							
						
					
					
						commit
						ca5d80f37d
					
				| @ -332,10 +332,10 @@ sub parse_crm { | ||||
|             if ($lines[$i] !~ /partition with quorum$/) { | ||||
|                 $self->{cluster}->{global}->{quorum}->{quorum_status} = 'noQuorum'; | ||||
|             } | ||||
|         } elsif ($lines[$i] =~ /^(offline|online):\s*\[\s*(.*?)\s*\]/i) { | ||||
|         } elsif ($lines[$i] =~ /^(?:(?:\s*\*\s*)?(offline|online)):\s*\[\s*(.*?)\s*\]/i) { | ||||
|             my @nodes = split(/\s+/, $2); | ||||
|             $self->{cluster}->{global}->{nodes}->{lc($1)} = scalar(@nodes); | ||||
|             $self->{cluster}->{global}->{nodes}->{lc($1) . '_names'} = ' ' . join(' ',  @nodes); | ||||
|             $self->{cluster}->{global}->{nodes}->{lc($1) . '_names'} = join(' ',  @nodes); | ||||
|         } elsif ($lines[$i] =~ /^node\s+(\S+?):\s*standby/i) { | ||||
|             $self->{cluster}->{global}->{nodes}->{standby}++; | ||||
|             $self->{cluster}->{global}->{nodes}->{standby_names} .= ' ' . $1; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user