Forum Discussion

Michael_Dieter's avatar
8 years ago

Juniper Switch HW Info

Name: Name: Juniper Virtual Chassis_lmsupport

Display Name: Displayed As: Juniper Virtual Chassis_HW Info

Locator Code: YWWE74

I modified (actually, I had help from Support) the datasource Juniper Virtual Chassis- so that values that originally were displayed in the UI as only descriptive text on per-instance mouse-overs are now presented as properties.  Juniper switches present difficulty to the datasource Device_Component_Inventory; this modification allows a single-step way to associate with stand alone switches and virtual chassis while getting inventory data on a per-member basis instead of on just whichever switch happens to be the virtual chassis routing-engine at the time of polling.  And it comes with the huge bonus that using ILP as the instance grouping method produces a great presentation in the UI.

It collects from jnxVirtualChassisMemberEntry (there are other values there that may be of interest to you, so walk it) for each member of a virtual chassis, but it does require that you enter any specific info you would like to see into the command

<set...member n location [any desirable text value]>.   We chose to enter building and room location along with asset tag number and it is stored by the property auto.vcmemberassetinfo 

Also, you will need to configure even standalone switches as a virtual chassis  <set...member 0 location [any desired value]>

The Descriptive text in the original datasource is not reportable, but properties are, and this lets us create a great report using the Device Inventory report.  It gives us

  • device name
  • building, room number and asset tag for each individual switch in a virtual chassis
  • serial number for each individual switch in a virtual chassis
  • HW model info for each individual switch in a virtual chassis
  • junos version for each individual switch in a virtual chassis

Special thanks to Support Engineer Johnny Y for doing most of the heavy lifting (after recognizing that I was trying to pound a screw in with a hammer), all the other Support Engineers who patiently answered my questions in a series of cases, and to CSM Kyle for kickstarting me.

  • On 7/18/2017 at 2:13 PM, Michael Dieter said:

    Hey Andrey..

    this use-case came to mind immediately when I initially saw the release notes announcing propertySources. but the reasons for not actually using a propertySource include: 1)as a dense, slow and dim-witted "network guy" I've had a hard time clearly and accurately understanding propertySources   2)my level of groovy-scripting competence is zero (see #1) and 3)I thought it would be easier to modify an existing datasource than to start from scratch (so basically I cheated, especially since Johnny Y took all my development notes and did the actual modification).

    I think it would be cool & hope that somebody does post this functionality as a propertysource; in the meantime hopefully other Juniper customers might get some value out of this one.

    @Michael Dieter This has got to one of the funniest replies I've had so far.

    You should check out the PropertySource 'Cisco_Product_Info' in core ( RHCKXN ) as its basically doing exactly what you are aiming to do, except its Cisco. Shouldn't be difficult to make it work for Juniper.

     

  • Hey Andrey..

    this use-case came to mind immediately when I initially saw the release notes announcing propertySources. but the reasons for not actually using a propertySource include: 1)as a dense, slow and dim-witted "network guy" I've had a hard time clearly and accurately understanding propertySources   2)my level of groovy-scripting competence is zero (see #1) and 3)I thought it would be easier to modify an existing datasource than to start from scratch (so basically I cheated, especially since Johnny Y took all my development notes and did the actual modification).

    I think it would be cool & hope that somebody does post this functionality as a propertysource; in the meantime hopefully other Juniper customers might get some value out of this one.