Branch Coverage

blib/lib/Nagios/Plugin/SNMP.pm
Criterion Covered Total %
branch 0 134 0.0


line true false branch
211 0 0 if (exists $args{'process_deltas'})
215 0 0 if (exists $$process_delta_opts{'cache'} and exists $$process_delta_opts{'cache'}{'type'})
220 0 0 if ($ct eq 'memcache')
240 0 0 if (exists $args{'error_on_no_such'})
247 0 0 if (defined $process_delta_opts)
273 0 0 if (defined $self->opts->get('timeout') and $self->opts->get('timeout') > 0)
419 0 0 unless (exists $$opts{'cache'})
424 0 0 if (!ref($$opts{'cache'}) eq 'HASH')
429 0 0 unless (exists $$opts{'cache'}{'type'})
438 0 0 if (exists $$opts{'default_interval'})
456 0 0 if ($cache_type eq 'memcache') { }
460 0 0 if ($@)
469 0 0 if (exists $$opts{'cache'}{'options'}{'memcache_addr'})
480 0 0 if (exists $$opts{'cache'}{'options'}{'memcache_port'})
496 0 0 if ($addr_required == 1)
500 0 0 if ($port_required == 1)
520 0 0 if (exists $$opts{'delta_compute_function'})
523 0 0 if (!ref($callback) eq 'CODE')
553 0 0 if ($cache_type eq 'memcache')
567 0 0 if $error
586 0 0 unless (exists $$self{'_SNMP_PROCESS_DELTAS'})
592 0 0 if (not exists $$spd{'cache'} or !ref($$self{'cache'}) =~ /^Cache::/)
614 0 0 unless defined $tv_ref
616 0 0 if ($self->opts->get('snmp-debug') == 1)
618 0 0 if defined $$tv_ref{'timestamp'}
620 0 0 if defined $$tv_ref{'value'}
647 0 0 if $result == 0
674 0 0 defined $self->opts->get('port') ? :
706 0 0 if ($opts->get('snmp-version') eq '3') { }
711 0 0 if $opts->get($p) eq ''
714 0 0 if scalar @errors > 0
719 0 0 if $opts->get('rocommunity') eq ''
724 0 0 if ($opts->get('snmp-local-ip') ne '')
726 0 0 unless $ip =~ /^(?:[0-9]{1,3}){4}$/
759 0 0 if scalar @{$opts->get('alt-host');} > 0
768 0 0 if $opts->get('snmp-timeout') > 0
772 0 0 if ($version eq '3') { }
780 0 0 if $opts->get('snmp-local-ip') ne ''
783 0 0 if $opts->get('snmp-max-msg-size') ne ''
788 0 0 if ($error ne '') { }
797 0 0 if (scalar @errors > 0 and scalar @errors == scalar @sessions)
823 0 0 unless scalar @oids > 0
849 0 0 if (not defined $results) { }
853 0 0 if ($error =~ /No response from/i) { }
863 0 0 if (scalar @sessions > 1)
876 0 0 if ($$self{'_SNMP_DIE_ON_NO_SUCH'} == 1)
878 0 0 if (defined $nosuch)
893 0 0 if (scalar @errors > 0 and scalar @errors == scalar @sessions)
948 0 0 if (not defined $result) { }
952 0 0 if ($error =~ /No response from/i) { }
965 0 0 if (scalar @sessions > 1)
977 0 0 if ($$self{'_SNMP_DIE_ON_NO_SUCH'} == 1)
979 0 0 if (defined $error)
996 0 0 if ($successes == scalar @baseoids)
1003 0 0 if (scalar @errors > 0 and scalar @errors == scalar @sessions)
1042 0 0 if ($self->opts->get('snmp-debug') == 1)
1046 0 0 if defined $$delta_function_args{$v}
1156 0 0 unless defined $previous_value
1157 0 0 if $current_value < $previous_value
1175 0 0 if (exists $$self{'_SNMP_PROCESS_DELTAS'}{'callback'}) { }
1190 0 0 if (not defined $$self{'_SNMP_SESSIONS'} or scalar @{$$self{'_SNMP_SESSIONS'};} == 0)
1203 0 0 if (defined $$self{'_SNMP_SESSIONS'})
1234 0 0 if exists $$self{'_SNMP_PROCESS_DELTAS'}
1239 0 0 if (defined $$self{'_SNMP_PROCESS_DELTAS'})
1306 0 0 if ($value =~ /nosuch/ism)
1311 0 0 scalar @errors == 0 ? :
1317 0 0 unless $self->opts->get('snmp-debug') == 1