DX NetOps

 View Only
  • 1.  Spectrum and ServiceNow CMDB integration

    Posted Jan 19, 2023 09:40 PM
    Hello Spectrum Experts

    I have a requirement where my CA Spectrum CIs needs to be synced to servicenow CMDB.

    This can be a scheduled process or a manual process to update servicenow CMDB at regular intervals for new devices discovered in CA Spectrum.

    Has anyone done such configuration and provide guidance. 

    Alternatively any other option which i can propose to the customer to achieve the requirement.

    Thanks
    Manish


  • 2.  RE: Spectrum and ServiceNow CMDB integration

    Broadcom Employee
    Posted Jan 20, 2023 12:56 AM
    Hi Manish,

    I see several ways to populate SNOW CMDB based on the link below (using importsets, using the cmdb API..)
    IMHO the cleanest way is to use spectrum REST API to extract inventory and feed that into ServiceNow. In fact, this is how many connectors work (e.g. DX OI).
    Here you have a couple of examples on how to query spectrum inventory
    HTH
    Nestor


  • 3.  RE: Spectrum and ServiceNow CMDB integration

    Broadcom Employee
    Posted Jan 20, 2023 05:28 PM
    Edited by Robert Kettles Jan 20, 2023 05:28 PM
    Hello everyone,
    There's no "instant" out of the box integration to bring device level information from Spectrum into ServiceNow, but there are a few methods available that you can use to extract the data out:
    • Modeling Gateway (XML file export)
    • REST API
    • Spectrum Report Manager queries
    Modeling Gateway
    The CMDB export format was built for loading into the CA CMDB but perhaps you could massage it a bit to put it into a format ServiceNow requires?  
    REST API
     
    The device endpoint with specific attributes may also be of use here:
    For example, if you wanted the device name, manufacturer, IP address, and device type:
    /spectrum/restful/devices?attr=0x1006e&attr=0x10000&attr=0x10032&attr=0x12d7f&attr=0x23000e
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <model-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response" total-models="41" throttle="41" error="EndOfResults">
        <model-responses>        
            <model mh="0x10047c1">
                <attribute id="0x1006e">node1</attribute>
                <attribute id="0x10032">net-snmp</attribute>
                <attribute id="0x12d7f">10.74.129.11</attribute>
                <attribute id="0x23000e">Net-SNMP Linux</attribute>
            </model>
            <model mh="0x1008ac3">
                <attribute id="0x1006e">Sim30120</attribute>
                <attribute id="0x10032">Avaya</attribute>
                <attribute id="0x12d7f">10.35.60.214</attribute>
                <attribute id="0x23000e">Avaya Aura Messaging</attribute>
            </model>
            <model mh="0x10052c3">
                <attribute id="0x1006e">PE-R1</attribute>
                <attribute id="0x10032">Cisco Systems, Inc.</attribute>
                <attribute id="0x12d7f">138.42.92.60</attribute>
                <attribute id="0x23000e">Cisco3640</attribute>
            </model>
            <model mh="0x100a185">
                <attribute id="0x1006e">Sim36406</attribute>
                <attribute id="0x10032">Cisco Systems, Inc.</attribute>
                <attribute id="0x12d7f">10.255.65.146</attribute>
                <attribute id="0x23000e">Cisco UCS 6454</attribute>
            </model>        
            <model mh="0x1008046">
                <attribute id="0x1006e">PlanoWorkstation</attribute>
                <attribute id="0x10032"></attribute>
                <attribute id="0x12d7f">192.168.20.21</attribute>
                <attribute id="0x23000e">IP Device</attribute>
            </model>
            <model mh="0x1007ecd">
                <attribute id="0x1006e">cEOS-1</attribute>
                <attribute id="0x10032">Arista Networks, Inc.</attribute>
                <attribute id="0x12d7f">138.42.92.20</attribute>
                <attribute id="0x23000e">Data Center Switch</attribute>
            </model>        
            <model mh="0x100a015">
                <attribute id="0x1006e">Sim37411</attribute>
                <attribute id="0x10032">Cisco Systems, Inc.</attribute>
                <attribute id="0x12d7f">10.255.65.74</attribute>
                <attribute id="0x23000e">Cisco UCS 6332-16UP</attribute>
            </model>        
            <model mh="0x10096df">
                <attribute id="0x1006e">Sim37080</attribute>
                <attribute id="0x10032">Cisco Systems, Inc.</attribute>
                <attribute id="0x12d7f">10.255.65.101</attribute>
                <attribute id="0x23000e">Cisco Nexus 9508-B2</attribute>
            </model>        
        </model-responses>
    </model-response-list>
    If you wanted condition, you could append "&attr=0x1000a" to the query but just be aware that it's an enumerated type that is returned:
    <model mh="0x10052c3">
                <attribute id="0x1006e">PE-R1</attribute>
                <attribute id="0x10032">Cisco Systems, Inc.</attribute>
                <attribute id="0x12d7f">138.42.92.60</attribute>
                <attribute id="0x23000e">Cisco3640</attribute>
                <attribute id="0x1000a">4</attribute>
            </model>
    The look up:
    /spectrum/restful/attribute/0x1000a/enums
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <attrtibute-enum-response xmlns="http://www.ca.com/spectrum/restful/schema/response">
        <attribute id="0x1000a"/>
        <enum value="Normal" id="0"/>
        <enum value="Minor" id="1"/>
        <enum value="Major" id="2"/>
        <enum value="Critical" id="3"/>
        <enum value="Maintenance" id="4"/>
        <enum value="Suppressed" id="5"/>
        <enum value="Initial" id="6"/>
      </attrtibute-enum-response>
    Spectrum Report Manager
    If you have SRM installed, you can query the MySQL database: 
    The view that would be of interest is v_dim_device_model:
    SRMDBAPI are read only views of the information that is in the "reporting" database:
    Using the views tends to simplify things since there may be information that requires joining underlying tables.
    Hopefully, that helps.

    -Rob