cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2507
Views
5
Helpful
8
Replies

How can we discover WAN devices in APIC-EM

Phaniraj D J
Level 1
Level 1

Dear All,

We have approximately  300 devices in WAN (All connected with MPLS links), How can we discover the devices using APICEM, Autodiscovery

Thanks

Phani

8 Replies 8

aradford
Cisco Employee
Cisco Employee

you would need to use the "discovery" app to kick off a discovery process.

If you do not have CDP access to the devices, then you would need to use IP range.

are you referring to the discovery process in APIC-EM or is it a different app ?discovery.PNG

I tried using the same however zero devices detected, Meanwhile I am reconfirming the policy in FW for discovery purposed port opened or not.

That is the one.

Can you ssh to the devices from APIC-EM?

Also need SNMP read only.

m.volodko
Level 1
Level 1

Phani,

If there is no single "seed" device which sees any other on CDP and every device is in separate subnet you probably cannot. Do you have any other network gear behind that WAN router which needs to be discovered?

In that case creation discovery job for each site sounds like good idea.

Hint: don't do it manually, this is definitely something which should be done by script via API.

Misha

Misha,

Thanks for the suggestions, there is no devices which as seeds of CDP, I understand we need to discover site wise , Is there any option to upload the device list rather adding manually,

Could suggest for API if any ?

Thanks

Phani

Hi Phani,


I created a PowerShell and python scripts to run a discovery from an input file - https://github.com/ymeloch/APIC-EM


Hope you'll find it useful.


Regards,

Yossi

Hi Yossi ,

Let me try powersheel LA& get back to you.  Thanks for the scripts

thanks

Phani

m.volodko
Level 1
Level 1

Phani,

API is https://<APIC-EM>/api/v1/discovery

It requires InventoryRequest  to be posted - see complete one on swagger. Not all the fields are mandatory.

I've got away with following (Warning: Javascript).

Please note IDs from globalCredentialIdList are relative only to my system. queryAPI is simple function which executes actual API call.

function create_one_discovery (token,ip) {

       var requestBody =  {

        "name": "dis_" + ip,

        "discoveryType": "CDP",

        "cdpLevel": 3,

        "protocolOrder": "ssh,telnet",

        "timeOut": 5,

        "retryCount": 3,

        "isAutoCdp": true,

        "globalCredentialIdList": [

          "67664efa-083c-4af8-ace4-03bc499be540",

          "72e6e95a-1142-4893-bae7-bdf8ac1c2959",

          "f4ee8f3a-b308-4c05-9cba-c21788ba2c8e",

          "0cfe3bbf-9267-434e-9e58-a74fb77bbad5",

          "ec4f510d-b5e3-4520-82df-2a860e238343",

          "b1b2b6bb-3049-46cc-947f-cf16098e8a01"],

        "ipAddressList": ip

        }

          var options = {

            method: 'POST',

            uri: 'https://'+ config.apicem + '/api/v1/discovery',

            body: requestBody,

              headers: {

                'Content-Type' : 'application/json',

                'X-Auth-Token' : token

              },

            json: true, // Automatically stringifies the body to JSON

            strictSSL: false,

            resolveWithFullResponse: false //

        };  

  return queryAPI(options)

}

When I have time to finish it would have simple web interface to create discoveries from list of IP.

Misha

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community