equal
deleted
inserted
replaced
63 open( FH, $file ) |
63 open( FH, $file ) |
64 or print "$NAME CRITICAL: $file $!\n" and exit $ERRORS{CRITICAL}; |
64 or print "$NAME CRITICAL: $file $!\n" and exit $ERRORS{CRITICAL}; |
65 my $r; |
65 my $r; |
66 while (<FH>) { |
66 while (<FH>) { |
67 chomp; |
67 chomp; |
68 if (/^.*(?<line>(?<resource>\d+):\s+cs:(?<connection_state>\S+)\s+(?:st|ro):(?<roles>\S+)\s+(?:ds|ld):(?<disk_states>\S+))/) { |
68 if (/^\s*(?<line>(?<resource>\d+):\s+cs:(?<connection_state>\S+)\s+(?:st|ro):(?<roles>\S+)\s+(?:ds|ld):(?<disk_states>\S+))/) { |
69 $r = $+{resource}; |
69 $r = $+{resource}; |
70 $drbd{$r} = { |
70 $drbd{$r} = { |
71 line => $+{line}, |
71 line => $+{line}, |
72 connection_state => $+{connection_state}, |
72 connection_state => $+{connection_state}, |
73 roles => $+{roles}, |
73 roles => $+{roles}, |