Ad Widget

Collapse

Cascading LLD - building Juniper COS items on Interface and Queue indexes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jameskirsop
    Member
    • Jul 2018
    • 32

    #1

    Cascading LLD - building Juniper COS items on Interface and Queue indexes

    The Juniper Class of Service queue statistics OIDs take the form 1.3.6.1.4.1.2636.3.15.4.1.{STATISTIC_INDEX}.{INTER FACE_INDEX}.{QUEUE_INDEX}

    Some interfaces may have 1 queue (0 index), or multiple queues). For example, the fourth queue on interface ex-0/2/0 on a switch I'm building monitoring against uses the OID 1.3.6.1.4.1.2636.3.15.4.1.10.575.3 where 10 is the type of data I need, 575 is the SNMPIndex of the interface, and the trailing 3 is the index of the queue.

    I can run an LLD to generate Items for each interface, but I then need to be able to determine how many queues are on each interface (given this varies depending on the interface). In my mind, it seems like I would need to cascade LLD from the interface level, down to the queue level like this:

    1. Run an interface discovery, and get the interface objects with their index. I can do this already using the standard Juniper templates.
    2. Then run another discovery that queries for the queues, using the interface index determined in step 1 in the (sub-)discovery.
    3. Create items using both pieces of information (interface and queue indexes)

    Currently I've got a statically defined item for queue 0 created by the interface discovery, but to have manual items for the 2nd 'level' would mean either that I'll end up with a lot of unnecessary (and disabled) items or perhaps missing some because the manual entries don't extend to the maximum range of queues that may be possible.

    Does anyone have a suggestion on how I could cascade LLD as described above?
Working...