check_nwc_health: Update to 7.3
This commit is contained in:
		
							parent
							
								
									662d9b1da8
								
							
						
					
					
						commit
						36ffda35d3
					
				
					 433 changed files with 795 additions and 323 deletions
				
			
		| 
						 | 
				
			
			@ -1,41 +0,0 @@
 | 
			
		|||
package Classes::Cisco::CISCOIPSECFLOWMONITOR::Component::VpnSubsystem;
 | 
			
		||||
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item);
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
sub init {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  $self->get_snmp_tables('CISCO-IPSEC-FLOW-MONITOR-MIB', [
 | 
			
		||||
      ['ciketunnels', 'cikeTunnelTable', 'Classes::Cisco::CISCOIPSECFLOWMONITOR::Component::VpnSubsystem::CikeTunnel',  sub { my ($o) = @_; $o->{parent} = $self; $self->filter_name($o->{cikeTunRemoteValue})}],
 | 
			
		||||
  ]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub check {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  if (! @{$self->{ciketunnels}}) {
 | 
			
		||||
    $self->add_critical(sprintf 'tunnel to %s does not exist',
 | 
			
		||||
        $self->opts->name);
 | 
			
		||||
  } else {
 | 
			
		||||
    foreach (@{$self->{ciketunnels}}) {
 | 
			
		||||
      $_->check();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
package Classes::Cisco::CISCOIPSECFLOWMONITOR::Component::VpnSubsystem::CikeTunnel;
 | 
			
		||||
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
sub check {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
# cikeTunRemoteValue per --name angegeben, muss active sein
 | 
			
		||||
# ansonsten watch-vpns, delta tunnels ueberwachen
 | 
			
		||||
  $self->add_info(sprintf 'tunnel to %s is %s',
 | 
			
		||||
      $self->{cikeTunRemoteValue}, $self->{cikeTunStatus});
 | 
			
		||||
  if ($self->{cikeTunStatus} ne 'active') {
 | 
			
		||||
    $self->add_critical();
 | 
			
		||||
  } else {
 | 
			
		||||
    $self->add_ok();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
package Classes::HOSTRESOURCESMIB;
 | 
			
		||||
our @ISA = qw(Classes::Device);
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,208 +0,0 @@
 | 
			
		|||
package Classes::IFMIB::Component::StackSubsystem;
 | 
			
		||||
our @ISA = qw(Classes::IFMIB::Component::InterfaceSubsystem);
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
sub init {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  my @iftable_columns = qw(ifDescr ifAlias ifOperStatus ifAdminStatus);
 | 
			
		||||
  $self->update_interface_cache(0);
 | 
			
		||||
  my @higher_indices = $self->get_interface_indices();
 | 
			
		||||
  if (! $self->opts->name) {
 | 
			
		||||
    # get_table erzwingen
 | 
			
		||||
    @higher_indices = ();
 | 
			
		||||
  }
 | 
			
		||||
  $self->get_snmp_tables("IFMIB", [
 | 
			
		||||
      ['stacks', 'ifStackTable', 'Classes::IFMIB::Component::StackSubsystem::Relationship'],
 | 
			
		||||
  ]);
 | 
			
		||||
  my @lower_indices = ();
 | 
			
		||||
  foreach my $rel (@{$self->{stacks}}) {
 | 
			
		||||
    if ($self->opts->name) {
 | 
			
		||||
      if (grep { $rel->{ifStackHigherLayer} == $_ } map { $_->[0]; } @higher_indices) {
 | 
			
		||||
        push(@lower_indices, [$rel->{ifStackLowerLayer}]);
 | 
			
		||||
      }
 | 
			
		||||
    } else {
 | 
			
		||||
      if ($rel->{ifStackLowerLayer} && $rel->{ifStackHigherLayer}) {
 | 
			
		||||
        push(@higher_indices, [$rel->{ifStackHigherLayer}]);
 | 
			
		||||
        push(@lower_indices, [$rel->{ifStackLowerLayer}]);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  @higher_indices = map { [$_] } keys %{{map {($_->[0] => 1)} @higher_indices}};
 | 
			
		||||
  @lower_indices = grep { $_->[0] != 0 } map { [$_] } keys %{{map {($_->[0] => 1)} @lower_indices}};
 | 
			
		||||
  my @indices = map { [$_] } keys %{{map {($_->[0] => 1)} (@higher_indices, @lower_indices)}};
 | 
			
		||||
  my $higher_interfaces = {};
 | 
			
		||||
  my $lower_interfaces = {};
 | 
			
		||||
  $self->{interfaces} = [];
 | 
			
		||||
  if (! $self->opts->name || scalar(@higher_indices) > 0) {
 | 
			
		||||
    my $indices = {};
 | 
			
		||||
    foreach ($self->get_snmp_table_objects(
 | 
			
		||||
        'IFMIB', 'ifTable+ifXTable', \@indices, \@iftable_columns)) {
 | 
			
		||||
      my $interface = Classes::IFMIB::Component::InterfaceSubsystem::Interface->new(%{$_});
 | 
			
		||||
      $higher_interfaces->{$interface->{ifIndex}} = $interface if grep { $interface->{ifIndex} == $_->[0] } @higher_indices;
 | 
			
		||||
      $lower_interfaces->{$interface->{ifIndex}} = $interface if grep { $interface->{ifIndex} == $_->[0] } @lower_indices;
 | 
			
		||||
      push(@{$self->{interfaces}}, $interface);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  $self->{higher_interfaces} = $higher_interfaces;
 | 
			
		||||
  $self->{lower_interfaces} = $lower_interfaces;
 | 
			
		||||
  $self->arista_schlamperei();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub arista_schlamperei {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  # sowas hier. 
 | 
			
		||||
  # IF-MIB::ifStackStatus.0.1000004 = INTEGER: active(1)
 | 
			
		||||
  # IF-MIB::ifStackStatus.1000004.0 = INTEGER: active(1)
 | 
			
		||||
  # IF-MIB::ifStackStatus.1000004.50 = INTEGER: active(1)
 | 
			
		||||
  my @liars = map {
 | 
			
		||||
    $_->{ifStackHigherLayer}
 | 
			
		||||
  } grep {
 | 
			
		||||
    exists $self->{higher_interfaces}->{$_->{ifStackHigherLayer}}
 | 
			
		||||
  } grep {
 | 
			
		||||
    $_->{ifStackLowerLayer} == 0
 | 
			
		||||
  } @{$self->{stacks}};
 | 
			
		||||
  @{$self->{stacks}} = grep {
 | 
			
		||||
      my $ref = $_;
 | 
			
		||||
      ! ($ref->{ifStackLowerLayer} == 0 && grep /^$ref->{ifStackHigherLayer}$/, @liars)
 | 
			
		||||
  } @{$self->{stacks}};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub check {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  my $higher_interfaces = $self->{higher_interfaces};
 | 
			
		||||
  my $lower_interfaces = $self->{lower_interfaces};
 | 
			
		||||
  my $lower_needed = {};
 | 
			
		||||
  my $lower_counter = {};
 | 
			
		||||
  if (! scalar keys %{$higher_interfaces}) {
 | 
			
		||||
    $self->add_ok("no portchannels found");
 | 
			
		||||
  } elsif (! scalar (@{$self->{stacks}})) {
 | 
			
		||||
    $self->add_ok("no portchannels found, ifStackTable is empty or unreadable");
 | 
			
		||||
  } else {
 | 
			
		||||
    foreach my $rel (@{$self->{stacks}}) {
 | 
			
		||||
      next if ! exists $higher_interfaces->{$rel->{ifStackHigherLayer}};
 | 
			
		||||
      $lower_counter->{$rel->{ifStackHigherLayer}} = 0
 | 
			
		||||
          if ! exists $lower_counter->{$rel->{ifStackHigherLayer}};
 | 
			
		||||
      $lower_needed->{$rel->{ifStackHigherLayer}} = 0
 | 
			
		||||
          if ! exists $lower_needed->{$rel->{ifStackHigherLayer}};
 | 
			
		||||
      if ($rel->{ifStackLowerLayer} == 0 && $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAdminStatus} eq 'down') {
 | 
			
		||||
        if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
          $self->add_ok(sprintf '%s (%s) is admin down',
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifDescr},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAlias},
 | 
			
		||||
          );
 | 
			
		||||
        }
 | 
			
		||||
      } elsif ($rel->{ifStackLowerLayer} == 0 && $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifOperStatus} eq 'lowerLayerDown' && defined $self->opts->mitigation()) {
 | 
			
		||||
        if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
          # Port-channel members are supposed to be down, for example
 | 
			
		||||
          # in a firewall cluster setup.
 | 
			
		||||
          # So this _could_ be a desired state. In order to allow this
 | 
			
		||||
          # state, it must be mitigated.
 | 
			
		||||
          $self->add_ok(sprintf '%s (%s) has stack status %s but upper interface has lowerLayerDown and no sublayer interfaces', $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifDescr},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAlias},
 | 
			
		||||
              $rel->{ifStackStatus});
 | 
			
		||||
        }
 | 
			
		||||
      } elsif ($rel->{ifStackLowerLayer} == 0 && $rel->{ifStackStatus} ne 'notInService') {
 | 
			
		||||
        if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
          $self->add_warning(sprintf '%s (%s) has stack status %s but no sub-layer interfaces', $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifDescr},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAlias},
 | 
			
		||||
              $rel->{ifStackStatus});
 | 
			
		||||
        }
 | 
			
		||||
      } elsif ($rel->{ifStackStatus} ne 'notInService' &&
 | 
			
		||||
          $lower_interfaces->{$rel->{ifStackLowerLayer}}->{ifOperStatus} ne 'up' &&
 | 
			
		||||
          $lower_interfaces->{$rel->{ifStackLowerLayer}}->{ifAdminStatus} ne 'down') {
 | 
			
		||||
        if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
          $self->add_critical(sprintf '%s (%s) has a sub-layer interface %s with status %s',
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifDescr},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAlias},
 | 
			
		||||
              $lower_interfaces->{$rel->{ifStackLowerLayer}}->{ifDescr},
 | 
			
		||||
              $lower_interfaces->{$rel->{ifStackLowerLayer}}->{ifOperStatus});
 | 
			
		||||
        }
 | 
			
		||||
        $lower_needed->{$rel->{ifStackHigherLayer}}++;
 | 
			
		||||
      } elsif ($rel->{ifStackStatus} ne 'notInService' &&
 | 
			
		||||
          $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifOperStatus} eq 'lowerLayerDown') {
 | 
			
		||||
        if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
          $self->add_critical(sprintf '%s (%s) has status %s',
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifDescr},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifAlias},
 | 
			
		||||
              $higher_interfaces->{$rel->{ifStackHigherLayer}}->{ifOperStatus});
 | 
			
		||||
        }
 | 
			
		||||
        $lower_counter->{$rel->{ifStackHigherLayer}}++;
 | 
			
		||||
        $lower_needed->{$rel->{ifStackHigherLayer}}++;
 | 
			
		||||
      } else {
 | 
			
		||||
        $lower_counter->{$rel->{ifStackHigherLayer}}++;
 | 
			
		||||
        $lower_needed->{$rel->{ifStackHigherLayer}}++;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    foreach my $interface (@{$self->{interfaces}}) {
 | 
			
		||||
      # gibt diese:
 | 
			
		||||
      # IF-MIB::ifStackStatus.0.1000201 = INTEGER: active(1)
 | 
			
		||||
      # IF-MIB::ifStackStatus.1000201.3 = INTEGER: active(1)
 | 
			
		||||
      # und diese
 | 
			
		||||
      # IF-MIB::ifStackStatus.0.1000501 = INTEGER: active(1)
 | 
			
		||||
      # der braeuchte eigentlich ein
 | 
			
		||||
      # IF-MIB::ifStackStatus.1000501.0 = INTEGER: active(1)
 | 
			
		||||
      # hat er aber nicht. deshalb waere $lower_counter/lower_needed
 | 
			
		||||
      # uninitialized, wenn nicht wieder mal der Lausser den 
 | 
			
		||||
      # Drecksmurkssnmpimplementierungen hinterherraeumen wuerde.
 | 
			
		||||
      if (! exists $lower_counter->{$interface->{ifIndex}}) {
 | 
			
		||||
        $lower_counter->{$interface->{ifIndex}} = 0;
 | 
			
		||||
      }
 | 
			
		||||
      if (! exists $lower_needed->{$interface->{ifIndex}}) {
 | 
			
		||||
        $lower_needed->{$interface->{ifIndex}} = 0;
 | 
			
		||||
      }
 | 
			
		||||
      # und gleich nochmal. 
 | 
			
		||||
      # IF-MIB::ifStackStatus.0.1000027 = INTEGER: active(1)
 | 
			
		||||
      # IF-MIB::ifStackStatus.1000027.0 = INTEGER: active(1)
 | 
			
		||||
      # IF-MIB::ifStackStatus.0.1000051 = INTEGER: active(1)
 | 
			
		||||
      # IF-MIB::ifStackStatus.1000051.35 = INTEGER: active(1)
 | 
			
		||||
      # IF-MIB::ifStackStatus.0.1000052 = INTEGER: active(1)
 | 
			
		||||
      # Schammts eich, Cisco. Pfui Deifl!
 | 
			
		||||
    }
 | 
			
		||||
    foreach my $index (keys %{$higher_interfaces}) {
 | 
			
		||||
      if ($self->mode =~ /device::interfaces::ifstack::status/) {
 | 
			
		||||
        $self->add_ok(sprintf 'interface %s has %d sub-layers',
 | 
			
		||||
            $higher_interfaces->{$index}->{ifDescr},
 | 
			
		||||
            $lower_counter->{$index});
 | 
			
		||||
      } elsif ($self->mode =~ /device::interfaces::ifstack::availability/) {
 | 
			
		||||
        my $availability = $lower_needed->{$index} ?
 | 
			
		||||
            (100 * $lower_counter->{$index} / $lower_needed->{$index}) : 0;
 | 
			
		||||
        my $cavailability = $availability == int($availability) ?
 | 
			
		||||
            $availability + 1: int($availability + 1.0);
 | 
			
		||||
        $self->add_info(sprintf '%s has %d of %d running sub-layer interfaces, availability is %.2f%%',
 | 
			
		||||
            $higher_interfaces->{$index}->{ifDescr},
 | 
			
		||||
            $lower_counter->{$index},
 | 
			
		||||
            $lower_needed->{$index},
 | 
			
		||||
            $availability);
 | 
			
		||||
        $self->set_thresholds(
 | 
			
		||||
            metric => 'aggr_'.$higher_interfaces->{$index}->{ifDescr}.'_availability',
 | 
			
		||||
            warning => '100:',
 | 
			
		||||
            critical => $cavailability.':'
 | 
			
		||||
        );
 | 
			
		||||
        $self->add_message($self->check_thresholds(
 | 
			
		||||
            metric => 'aggr_'.$higher_interfaces->{$index}->{ifDescr}.'_availability',
 | 
			
		||||
            value => $availability,
 | 
			
		||||
        ));
 | 
			
		||||
        $self->add_perfdata(
 | 
			
		||||
            label => 'aggr_'.$higher_interfaces->{$index}->{ifDescr}.'_availability',
 | 
			
		||||
            value => $availability,
 | 
			
		||||
            uom => '%',
 | 
			
		||||
        );
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    $self->reduce_messages_short(sprintf '%d portchannel%s working fine',
 | 
			
		||||
        scalar(keys %{$higher_interfaces}),
 | 
			
		||||
        scalar(keys %{$higher_interfaces}) ? 's' : '',
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
package Classes::IFMIB::Component::StackSubsystem::Relationship;
 | 
			
		||||
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem);
 | 
			
		||||
 | 
			
		||||
sub finish {
 | 
			
		||||
  my ($self) = @_;
 | 
			
		||||
  $self->{ifStackHigherLayer} = $self->{indices}->[0];
 | 
			
		||||
  $self->{ifStackLowerLayer} = $self->{indices}->[1];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,21 @@
 | 
			
		|||
* 2018-09-10 7.3
 | 
			
		||||
  update stack-status
 | 
			
		||||
  add servertype hostresource
 | 
			
		||||
  update cisco vpn-status
 | 
			
		||||
* 2018-08-13 7.2.0.2
 | 
			
		||||
  bugfix in interface-modes where --name3 found no match
 | 
			
		||||
* 2018-08-10 7.2.0.1
 | 
			
		||||
  bugfix in ios ha-status, ignore cable "failover" description
 | 
			
		||||
* 2018-08-01 7.2
 | 
			
		||||
  add packet forwarding engine metrics for juniper standby nodes
 | 
			
		||||
* 2018-07-26 7.1
 | 
			
		||||
  add custom thresholds for cisco ccm
 | 
			
		||||
  detect fritzbox 7490
 | 
			
		||||
* 2018-07-13 7.0.2
 | 
			
		||||
  add interface-uptime
 | 
			
		||||
 2018-07-05 7.0.1.6
 | 
			
		||||
  fix a bug in non-map FabOS memory
 | 
			
		||||
  set thresholds to 100% for cisco asa heapcache memory-usage
 | 
			
		||||
* 2018-06-18 7.0.1.5
 | 
			
		||||
  update glplugin (get_snmp_table_objects waja fix)
 | 
			
		||||
* 2018-05-05 7.0.1.4
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +20,7 @@ eval {
 | 
			
		|||
  $Data::Dumper::Sparseseen = 1;
 | 
			
		||||
};
 | 
			
		||||
our $AUTOLOAD;
 | 
			
		||||
*VERSION = \'3.0.2.6';
 | 
			
		||||
*VERSION = \'3.0.3';
 | 
			
		||||
 | 
			
		||||
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1052,9 +1052,9 @@ sub get_level {
 | 
			
		|||
  my ($self) = @_;
 | 
			
		||||
  return OK if ! exists $self->{tmp_level};
 | 
			
		||||
  my $code = OK;
 | 
			
		||||
  $code ||= CRITICAL if $self->{tmp_level}->{critical};
 | 
			
		||||
  $code ||= WARNING  if $self->{tmp_level}->{warning};
 | 
			
		||||
  $code ||= UNKNOWN  if $self->{tmp_level}->{unknown};
 | 
			
		||||
  return CRITICAL if $self->{tmp_level}->{critical};
 | 
			
		||||
  return WARNING  if $self->{tmp_level}->{warning};
 | 
			
		||||
  return UNKNOWN  if $self->{tmp_level}->{unknown};
 | 
			
		||||
  return $code;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1092,7 +1092,30 @@ sub establish_snmp_session {
 | 
			
		|||
    # next try: 50
 | 
			
		||||
    $params{'-timeout'} = $self->opts->timeout() >= 60 ?
 | 
			
		||||
        50 : $self->opts->timeout() - 2;
 | 
			
		||||
    my $stderrvar = "";
 | 
			
		||||
    *SAVEERR = *STDERR;
 | 
			
		||||
    open ERR ,'>',\$stderrvar;
 | 
			
		||||
    *STDERR = *ERR;
 | 
			
		||||
    my ($session, $error) = Net::SNMP->session(%params);
 | 
			
		||||
    *STDERR = *SAVEERR;
 | 
			
		||||
    if ($stderrvar && $error && $error =~ /Time synchronization failed/) {
 | 
			
		||||
      # This is what you get when you have
 | 
			
		||||
      # - an APC ups with a buggy firmware.
 | 
			
		||||
      # - no chance to update it.
 | 
			
		||||
      # - a support contract.
 | 
			
		||||
      no strict 'refs';
 | 
			
		||||
      no warnings 'redefine';
 | 
			
		||||
      *{'Net::SNMP::_discovery_synchronization_cb'} = sub {
 | 
			
		||||
        my ($this) = @_;
 | 
			
		||||
        if ($this->{_security}->discovered())
 | 
			
		||||
        {
 | 
			
		||||
          $this->_error_clear();
 | 
			
		||||
          return $this->_discovery_complete();
 | 
			
		||||
        }
 | 
			
		||||
        return $this->_discovery_failed();
 | 
			
		||||
      };
 | 
			
		||||
      ($session, $error) = Net::SNMP->session(%params);
 | 
			
		||||
    }
 | 
			
		||||
    if (! defined $session) {
 | 
			
		||||
      $self->add_message(CRITICAL, 
 | 
			
		||||
          sprintf 'cannot create session object: %s', $error);
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
package Monitoring::GLPlugin::SNMP::MibsAndOids::JUNIPERALARMMIB;
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'JUNIPER-ALARM-MIB'} = {
 | 
			
		||||
  url => '',
 | 
			
		||||
  name => 'JUNIPER-ALARM-MIB',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'JUNIPER-ALARM-MIB'} =
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'JUNIPER-ALARM-MIB'} = {
 | 
			
		||||
  jnxAlarms => '1.3.6.1.4.1.2636.3.4',
 | 
			
		||||
  jnxCraftAlarms => '1.3.6.1.4.1.2636.3.4.2',
 | 
			
		||||
  jnxAlarmRelayMode => '1.3.6.1.4.1.2636.3.4.2.1',
 | 
			
		||||
  jnxAlarmRelayModeDefinition => 'JUNIPER-ALARM-MIB::jnxAlarmRelayMode',
 | 
			
		||||
  jnxYellowAlarms => '1.3.6.1.4.1.2636.3.4.2.2',
 | 
			
		||||
  jnxYellowAlarmState => '1.3.6.1.4.1.2636.3.4.2.2.1',
 | 
			
		||||
  jnxYellowAlarmStateDefinition => 'JUNIPER-ALARM-MIB::jnxYellowAlarmState',
 | 
			
		||||
  jnxYellowAlarmCount => '1.3.6.1.4.1.2636.3.4.2.2.2',
 | 
			
		||||
  jnxYellowAlarmLastChange => '1.3.6.1.4.1.2636.3.4.2.2.3',
 | 
			
		||||
  jnxRedAlarms => '1.3.6.1.4.1.2636.3.4.2.3',
 | 
			
		||||
  jnxRedAlarmState => '1.3.6.1.4.1.2636.3.4.2.3.1',
 | 
			
		||||
  jnxRedAlarmStateDefinition => 'JUNIPER-ALARM-MIB::jnxRedAlarmState',
 | 
			
		||||
  jnxRedAlarmCount => '1.3.6.1.4.1.2636.3.4.2.3.2',
 | 
			
		||||
  jnxRedAlarmLastChange => '1.3.6.1.4.1.2636.3.4.2.3.3',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'JUNIPER-ALARM-MIB'} = {
 | 
			
		||||
  jnxRedAlarmState => {
 | 
			
		||||
    '1' => 'other',
 | 
			
		||||
    '2' => 'off',
 | 
			
		||||
    '3' => 'on',
 | 
			
		||||
  },
 | 
			
		||||
  jnxYellowAlarmState => {
 | 
			
		||||
    '1' => 'other',
 | 
			
		||||
    '2' => 'off',
 | 
			
		||||
    '3' => 'on',
 | 
			
		||||
  },
 | 
			
		||||
  jnxAlarmRelayMode => {
 | 
			
		||||
    '1' => 'other',
 | 
			
		||||
    '2' => 'passOn',
 | 
			
		||||
    '3' => 'cutOff',
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -93,6 +93,7 @@ $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'JUNIPER-MIB'} = {
 | 
			
		|||
  jnxOperatingChassisIdDefinition => 'JUNIPER-MIB::JnxChassisId',
 | 
			
		||||
  jnxOperatingChassisDescr => '1.3.6.1.4.1.2636.3.1.13.1.18',
 | 
			
		||||
  jnxOperatingRestartTime => '1.3.6.1.4.1.2636.3.1.13.1.19',
 | 
			
		||||
  jnxOperatingRestartTimeDefinition => 'MIB-2-MIB::DateAndTime',
 | 
			
		||||
  jnxRedundancyTable => '1.3.6.1.4.1.2636.3.1.14',
 | 
			
		||||
  jnxRedundancyEntry => '1.3.6.1.4.1.2636.3.1.14.1',
 | 
			
		||||
  jnxRedundancyContentsIndex => '1.3.6.1.4.1.2636.3.1.14.1.1',
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,53 @@
 | 
			
		|||
package Monitoring::GLPlugin::SNMP::MibsAndOids::JUNIPERRPSMIB;
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'JUNIPER-RPS-MIB'} = {
 | 
			
		||||
  url => '',
 | 
			
		||||
  name => 'JUNIPER-RPS-MIB',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'JUNIPER-RPS-MIB'} =
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'JUNIPER-RPS-MIB'} = {
 | 
			
		||||
  jnxRPSMIBObjects => '1.3.6.1.4.1.2636.3.40.1.6.1',
 | 
			
		||||
  jnxRPSVersionTable => '1.3.6.1.4.1.2636.3.40.1.6.1.1',
 | 
			
		||||
  jnxRPSVersionEntry => '1.3.6.1.4.1.2636.3.40.1.6.1.1.1',
 | 
			
		||||
  jnxRPSSerialNumber => '1.3.6.1.4.1.2636.3.40.1.6.1.1.1.1',
 | 
			
		||||
  jnxRPSModel => '1.3.6.1.4.1.2636.3.40.1.6.1.1.1.2',
 | 
			
		||||
  jnxRPSFirmwareVersion => '1.3.6.1.4.1.2636.3.40.1.6.1.1.1.3',
 | 
			
		||||
  jnxRPSUBootVersion => '1.3.6.1.4.1.2636.3.40.1.6.1.1.1.4',
 | 
			
		||||
  jnxRPSStatusTable => '1.3.6.1.4.1.2636.3.40.1.6.1.2',
 | 
			
		||||
  jnxRPSStatusEntry => '1.3.6.1.4.1.2636.3.40.1.6.1.2.1',
 | 
			
		||||
  jnxRPSFanStatus => '1.3.6.1.4.1.2636.3.40.1.6.1.2.1.1',
 | 
			
		||||
  jnxRPSFanStatusDefinition => 'JUNIPER-RPS-MIB::JnxRPSStatus',
 | 
			
		||||
  jnxRPSSystemStatus => '1.3.6.1.4.1.2636.3.40.1.6.1.2.1.2',
 | 
			
		||||
  jnxRPSSystemStatusDefinition => 'JUNIPER-RPS-MIB::JnxRPSStatus',
 | 
			
		||||
  jnxRPSPowerSupplyTable => '1.3.6.1.4.1.2636.3.40.1.6.1.3',
 | 
			
		||||
  jnxRPSPowerSupplyEntry => '1.3.6.1.4.1.2636.3.40.1.6.1.3.1',
 | 
			
		||||
  jnxRPSPowerSupplyIndex => '1.3.6.1.4.1.2636.3.40.1.6.1.3.1.1',
 | 
			
		||||
  jnxRPSPowerSupplySlotId => '1.3.6.1.4.1.2636.3.40.1.6.1.3.1.2',
 | 
			
		||||
  jnxRPSPowerSupplyStatus => '1.3.6.1.4.1.2636.3.40.1.6.1.3.1.3',
 | 
			
		||||
  jnxRPSPowerSupplyDescription => '1.3.6.1.4.1.2636.3.40.1.6.1.3.1.4',
 | 
			
		||||
  jnxRPSLedPortStatusTable => '1.3.6.1.4.1.2636.3.40.1.6.1.4',
 | 
			
		||||
  jnxRPSLedPortStatusEntry => '1.3.6.1.4.1.2636.3.40.1.6.1.4.1',
 | 
			
		||||
  jnxRPSLedPortIndex => '1.3.6.1.4.1.2636.3.40.1.6.1.4.1.1',
 | 
			
		||||
  jnxRPSLedPortStatus => '1.3.6.1.4.1.2636.3.40.1.6.1.4.1.2',
 | 
			
		||||
  jnxRPSPortStatusTable => '1.3.6.1.4.1.2636.3.40.1.6.1.5',
 | 
			
		||||
  jnxRPSPortStatusEntry => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1',
 | 
			
		||||
  jnxRPSPortIndex => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1.1',
 | 
			
		||||
  jnxRPSPortId => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1.2',
 | 
			
		||||
  jnxRPSPortStatus => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1.3',
 | 
			
		||||
  jnxRPSPortPriority => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1.4',
 | 
			
		||||
  jnxRPSPortPowerRequested => '1.3.6.1.4.1.2636.3.40.1.6.1.5.1.5',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'JUNIPER-RPS-MIB'} = {
 | 
			
		||||
  JnxRPSStatus => {
 | 
			
		||||
    '0' => 'green',
 | 
			
		||||
    '1' => 'red',
 | 
			
		||||
    '2' => 'amber',
 | 
			
		||||
    '3' => 'green-blink',
 | 
			
		||||
    '4' => 'red-blink',
 | 
			
		||||
    '5' => 'amber-blink',
 | 
			
		||||
    '6' => 'off',
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
package Monitoring::GLPlugin::SNMP::MibsAndOids::JUNIPERSRX5000SPUMONITORINGMIB;
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'JUNIPER-SRX5000-SPU-MONITORING-MIB'} = {
 | 
			
		||||
  url => '',
 | 
			
		||||
  name => 'JUNIPER-SRX5000-SPU-MONITORING-MIB',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'JUNIPER-SRX5000-SPU-MONITORING-MIB'} =
 | 
			
		||||
    '1.3.6.1.4.1.2636.3.39.1.12.1';
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'JUNIPER-SRX5000-SPU-MONITORING-MIB'} = {
 | 
			
		||||
  jnxJsSPUMonitoringMIB => '1.3.6.1.4.1.2636.3.39.1.12.1',
 | 
			
		||||
  jnxJsSPUMonitoringObjectsTable => '1.3.6.1.4.1.2636.3.39.1.12.1.1',
 | 
			
		||||
  jnxJsSPUMonitoringObjectsEntry => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1',
 | 
			
		||||
  jnxJsSPUMonitoringIndex => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.1',
 | 
			
		||||
  jnxJsSPUMonitoringFPCIndex => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.2',
 | 
			
		||||
  jnxJsSPUMonitoringSPUIndex => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.3',
 | 
			
		||||
  jnxJsSPUMonitoringCPUUsage => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4',
 | 
			
		||||
  jnxJsSPUMonitoringMemoryUsage => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.5',
 | 
			
		||||
  jnxJsSPUMonitoringCurrentFlowSession => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.6',
 | 
			
		||||
  jnxJsSPUMonitoringMaxFlowSession => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.7',
 | 
			
		||||
  jnxJsSPUMonitoringCurrentCPSession => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.8',
 | 
			
		||||
  jnxJsSPUMonitoringMaxCPSession => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.9',
 | 
			
		||||
  jnxJsSPUMonitoringNodeIndex => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.10',
 | 
			
		||||
  jnxJsSPUMonitoringNodeDescr => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.11',
 | 
			
		||||
  jnxJsSPUMonitoringFlowSessIPv4 => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.12',
 | 
			
		||||
  jnxJsSPUMonitoringFlowSessIPv6 => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.13',
 | 
			
		||||
  jnxJsSPUMonitoringCPSessIPv4 => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.14',
 | 
			
		||||
  jnxJsSPUMonitoringCPSessIPv6 => '1.3.6.1.4.1.2636.3.39.1.12.1.1.1.15',
 | 
			
		||||
  jnxJsSPUMonitoringCurrentTotalSession => '1.3.6.1.4.1.2636.3.39.1.12.1.2',
 | 
			
		||||
  jnxJsSPUMonitoringMaxTotalSession => '1.3.6.1.4.1.2636.3.39.1.12.1.3',
 | 
			
		||||
  jnxSPUClusterObjectsTable => '1.3.6.1.4.1.2636.3.39.1.12.1.4',
 | 
			
		||||
  jnxSPUClusterObjectsEntry => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1',
 | 
			
		||||
  jnxJsClusterMonitoringNodeIndex => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.1',
 | 
			
		||||
  jnxJsClusterMonitoringNodeDescr => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.2',
 | 
			
		||||
  jnxJsNodeCurrentTotalSession => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.3',
 | 
			
		||||
  jnxJsNodeMaxTotalSession => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.4',
 | 
			
		||||
  jnxJsNodeSessionCreationPerSecond => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.5',
 | 
			
		||||
  jnxJsNodeSessCreationPerSecIPv4 => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.6',
 | 
			
		||||
  jnxJsNodeSessCreationPerSecIPv6 => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.7',
 | 
			
		||||
  jnxJsNodeCurrentTotalSessIPv4 => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.8',
 | 
			
		||||
  jnxJsNodeCurrentTotalSessIPv6 => '1.3.6.1.4.1.2636.3.39.1.12.1.4.1.9',
 | 
			
		||||
  jnxJsSPUMonitoringTotalSessIPv4 => '1.3.6.1.4.1.2636.3.39.1.12.1.5',
 | 
			
		||||
  jnxJsSPUMonitoringTotalSessIPv6 => '1.3.6.1.4.1.2636.3.39.1.12.1.6',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'JUNIPER-SRX5000-SPU-MONITORING-MIB'} = {
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -92,6 +92,11 @@ $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'MIB-2-MIB'} = {
 | 
			
		|||
      $year -= 1900;
 | 
			
		||||
      $month += 1;
 | 
			
		||||
    }
 | 
			
		||||
    if ($year == 0 && $month == 0) {
 | 
			
		||||
      $year = 1970;
 | 
			
		||||
      $month = 1;
 | 
			
		||||
      $day = 1;
 | 
			
		||||
    }
 | 
			
		||||
    my $epoch = timegm($second, $minute, $hour, $day, $month-1, $year-1900);
 | 
			
		||||
    # 1992-5-26,13:30:15.0,-4:0 = Tuesday May 26, 1992 at 1:30:15 PM EDT
 | 
			
		||||
    # Eastern Daylight Time (EDT) is 4 hours behind Coordinated Universal Time (UTC)
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue