Junos OS

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



Expand all | Collapse all

Config Info that can be Parsed into a DB

  • 1.  Config Info that can be Parsed into a DB

    Posted 25 days ago

    Greetings...I am new here.  I am not new to JunOS, but it has been a few years since I did much more than write firewall rules for the SRX series.

    I've been tasked with a project where they want to be able to use the actual Juniper device (firewall, switch, router...whatever) as the "source of truth" with information on the device, that can be polled somehow (api, script, I dunno...) and this information be stored in a centralized database.  As it stands, they have multiple databases, and several Excel spreadsheets, all of which get maintained at varying levels.

    Some stuff, I'm pretty sure will be easy to get.  Like the device name, management IP, model number, JunOS version number, etc.  All that is already stored on the device.

    However, they are also wanting to store things like the relay rack #, building, floor, etc.  I see there is something like that here:

    ​# set system location ?
    Possible completions:
    altitude Feet above (or below) sea level
    + apply-groups Groups from which to inherit configuration data
    + apply-groups-except Don't inherit configuration data from these groups
    building Building name
    country-code Two-letter country code
    floor Floor of the building
    hcoord Bellcore horizontal coordinate
    lata Local access transport area
    latitude Latitude in degree format
    longitude Longitude in degree format
    npa-nxx First six digits of phone number (area code plus exchange)
    postal-code Zip code or postal code
    rack Rack number
    vcoord Bellcore vertical coordinate

    ...but they also want to store more information, like site contact, address, what applications are using this particular device and contact info for that group, etc.  

    All I have found so far is maybe using an "annotate chassis XXX" which can pretty much have anything in it.  Would there be a better place to store that information?

    Also, what would you suggest as the way to pull that info from the device to be stored into a centralized database (this is the part I have zero experience with).

    Finally, this isn't my choice of how to go about doing this....I've just been tasked with trying to figure out HOW to do it.  Thanks ahead of time!






    ------------------------------
    ANDREW PARRIS
    ------------------------------


  • 2.  RE: Config Info that can be Parsed into a DB

     
    Posted 25 days ago
    Yeah network device as a database!

    Well it's not a database so I'm thinking your most logical option is to look for a description field that is somehow related to the data being stored itself.  Then putting the data in as the description.  The advantage is the configuration will all make sense.  The disadvantage is the data is going to be all over the place.

    As you mention annotations can be anything anywhere.  But that data only appears when you do a full normal configuration view.  The description fields will be visible in all view types that get executed.

    Both of these options will have character limits, not sure what they are.

    The next issue of retrieval will be testing the api calls to see if either of these show up in valid api queries.  Or if you will be forced to do either a netconf or ssh session to get the config itself.   For general usage scripting with python is probably the best bet for this application.

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 3.  RE: Config Info that can be Parsed into a DB

    Posted 24 days ago
    Thank you so much for the response, Steve.

    That's what I was kinda afraid of.  As I said...not my idea...I'm just tasked with making it work somehow.  :)


    ------------------------------
    ANDREW PARRIS
    ------------------------------