Ahhh, ok I see.

 

Yea I agree with Mike, this is bad practice L

 

But I don’t blame you and this shows nicely why it is so important to make things work in sensible ways initially so that users do not feel compelled to make such hacks. Thanks Luis.

 

PS; I would try the suggested workaround Luis with the Sensor Measured Port Group as that is more robust even if awkward.

 

Cheers, A

 

From: Mike Stupalov via observium <observium@observium.org>
Sent: 28 March 2019 14:20
To: Observium <observium@observium.org>; Luis Balbinot via observium <observium@observium.org>
Cc: Mike Stupalov <mike@observium.org>
Subject: Re: [Observium] Low dbm sensor alerts for shutdown interfaces

 

ohh, no.. pleeeeease, do not use this!..

Luis Balbinot via observium wrote on 28/03/2019 17:17:

Sure, but it's ugly.

 

I have a nicer solution for the Juniper-DOM MIB but I came up with a quick and dirty one for the Cisco Entity Sensor MIB. Basically we skip the discovery for interfaces that are shutdown. This could be done much earlier in the code, etc, but it will work for you for now.

 

Each MIB has a different approach so it's up to Alan to decide on a unified solution that catches all.

 

Index: cisco-entity-sensor-mib.inc.php

===================================================================

--- cisco-entity-sensor-mib.inc.php (revision 9792)

+++ cisco-entity-sensor-mib.inc.php (working copy)

@@ -156,6 +156,9 @@

           $options['measured_class']   = 'port';

           $options['measured_entity']  = $port['port_id'];

           $options['entPhysicalIndex_measured'] = $port['ifIndex'];

+          if ($port['ifAdminStatus'] == "down") {

+            continue;

+          }

         }

 

       }

 

On Thu, Mar 28, 2019 at 10:39 AM Andrew Lemin <AndrewL@4d-dc.com> wrote:

Hey Luis,

 

Oh wow, yes please. Could you share it here in the list so that Adam can review it also?

If it makes sense and is not in conflict with other logic Adam may be able to integrate it J

 

For now this (see below) does seem to work.. And there are other far more important things to worry about (choose your battles etc ;) – For us our No1 missing-feature is being able to generate alerts when the [CDR] threshold is breached on an interface.

 

We have this fantastic mechanism for encoding the CDR’s on interfaces using ‘[]’, but no means of actually doing anything useful with it! L

We desperately want to kill of Cacti, but we cannot until Observium supports interface threshold alerting based on the interface description’s [CDR] value.

 

What do we have to do to make this happen Adam? It seems such a waste having [CDR] but not being able to use it?

 

 

 

Thanks again,

All the best, Andy.

 

From: Luis Balbinot <luis@luisbalbinot.com>
Sent: 28 March 2019 13:06
To: Observium <observium@observium.org>
Cc: Andrew Lemin <AndrewL@4d-dc.com>
Subject: Re: [Observium] Low dbm sensor alerts for shutdown interfaces

 

That bothered me too. I have a small patch for that if you want it. 

 

Luis

 

On Fri, Mar 22, 2019, 12:46 Andrew Lemin via observium <observium@observium.org> wrote:

Hi,

 

Has anyone else seen the issue where after enabling an alert checker for transceiver optics with sensor_value greater @sensor_limit and sensor_value less @sensor_limit_low, alerts are still received for shutdown interfaces?

 

For example, on a cisco switch when running ‘show interfaces transceiver detail’, we can see;

           Optical            High Alarm  High Warn  Low Warn   Low Alarm

           Receive Power      Threshold   Threshold  Threshold  Threshold

Port       (dBm)              (dBm)       (dBm)      (dBm)      (dBm)

Te1/1/25   -40.0                 1.9        -1.0        -9.9      -13.9

Te2/1/1    -40.0                 1.9        -1.0        -9.9      -13.9

Etc..

 

Te1/1/25                       admin down     down

Te2/1/1                        admin down     down

Etc

 

The sensors page shows the correct thresholds etc, but shows the interface in Red (and hence is generating alerts through the checker), rather than grey (as the port is shutdown and has no fibre connected – hence -40dbm.).

 

The same port on the Ports page does show the interface as being grey/shutdown

 

Have no idea how to resolve this and stop getting transceiver alerts for shutdown interfaces? This sounds like a potential bug?

 

Thanks, Andy.

_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

 

--
Mike Stupalov
Observium Limited, http://observium.org