Network Management

last person joined: 5 hours ago 

Keep an informative eye on your network with IMC and Airwave network management solutions.
Expand all | Collapse all

Update Airwave AP notes to show Switch name & port

  • 1.  Update Airwave AP notes to show Switch name & port

    Posted Dec 08, 2016 10:31 PM

    We'd like to update the notes under each AP to show the connected with name & port.  We can bulk extract this via the LLDP tables on our procurve switches but need to bulk upload this onto existing APs in Airwave.

     

    We'd find this extemely helpful during troubleshooting.

     

    Does anyone know how this can be done via the Airwave CLI or maybe the API?

     

    Thanks,

     

    Glen.



  • 2.  RE: Update Airwave AP notes to show Switch name & port

    Posted Dec 09, 2016 12:07 AM

    If you add the procurve switches to airwave as devices, it will read the mac address table and match them to the wired port on an AP and show the procurve switch and port as an upstream device and upstream port:

     

    Screenshot 2016-12-08 at 23.05.28.png



  • 3.  RE: Update Airwave AP notes to show Switch name & port

    Posted Dec 11, 2016 06:21 PM

    That would be the ideal solution, yes.

     

    I would do that if we had licenses to burn.  

    We have several thousand switches and our Airwave is running close to capacity on licenses and performance so adding the switches is not really an option at this stage.

     

    Glen.

     



  • 4.  RE: Update Airwave AP notes to show Switch name & port

    Posted Dec 11, 2016 07:06 PM

    Hi,

     

    I'd like to be able to bulk import data in to airwave, specifically if there was some way to take the output of:

    sho ap lldp info neighbors

    and import that into airwave so that it appears in the "notes" field,

    especially when a WAP has gone off the air for an unknown reason,

    i'd be absolutely ecstatic, as it would make fault-finding soooo much easier!

    (We've got a LOT of WAPs, so doing this manually one by one isn't an option, we'd not complete that task before the next hardware refresh is due!)

     

    I'm happy with any level of massaging of the data from sho ap lldp that i need to do to accomplish this.

    Converting to cli commands, dbc commands, api calls?

    Anything, as long as there's a way to do this.

    Thanks!



  • 5.  RE: Update Airwave AP notes to show Switch name & port

    Posted Dec 13, 2016 09:21 PM
    I experimented with this once before and was successful about a year ago with help from TAC. It involved me exporting a csv file of the device table via airwave cli (device id #, ap name, mac address), merging that with another csv file that had our switch port information and ap Mac address, and then forming a few hundred update note commands. I'll see if I can find the original syntax I used.


    #AirheadsMobile


  • 6.  RE: Update Airwave AP notes to show Switch name & port

    Posted Dec 19, 2016 11:53 AM

    Glen,

    Sorry for the delay (getting busy with end of the semester/holiday break coming up). I’m not sure how familiar you are with the Airwave CLI or database queries (PSQL), but updating the note is relatively easy. Each monitored device in Airwave has an associated “id” in the database – you’ll see this ID in the URL of the GUI -> ex: https://airwave /ap_monitoring?id=516

    Caution: I would always make backups before you attempt manipulating the database. I’ve made use of the commands several times without issue – but I’m an amateur and always cautious.

     

    TAC also may be able to help you accomplish this. I had contacted them last year concerning if it was possible to import a CSV contain AP Mac Addresses with Jack #s. They did help me bulk update all the notes - but only to a specific value. They said they could look into building a script to accomplish what I desired - I wanted to take them up on the offer but got busy with other projects. These instructions aren't the best but I'm leaving for a few weeks tomorrow and wanted to give you something to play around with - just be careful as you might end up accidentally overwriting previous notes.

     

    Updating Specific AP Notes based on ID Field:

    If I wanted to update the notes of my AP named “Farmhouse” [ID=516] to “Switch7 – Port Gi7/2 – XXX” via the CLI, I would do the following:

    1. Login to Airwave CLI
    2. Type ‘db’ to run psql – the cli should update from [root@airwave mercury] to airwave=>
    3. Type ‘update ap set notes = 'Switch7 – Port Gi7/2 – XXX' where ap.id = 505;’
    4. If successful, you’ll see a “UPDATE 1”
    5. You can also check the current value via - select ap.name, ap.id, ap.notes from ap where ap.id='505';
    6. Type ‘\q’ to exit the database.

    Retrieving ID of every AP in Airwave:

    1. Login to Airwave CLI
    2. Type dbcsv "SELECT ap.name, ap.lan_mac, ap.device_serial, ap.id, ap.notes FROM AP" > ./ap-id-database.csv
    3. TFTP the file or use WinSCP to retrieve the file.
    4. I chose these specific fields because these were the ones I was interested in. You could do a dbcsv “Select * from AP’ – but I’ve found that some of the rows are off by one or two due to missing data. There's another CSV command that includes headers, but I've never been able to get it to work.
    5. I then merged this csv with a csv that had the correlated switch-port information – and matched them up with my MAC Address.

    Creating the Update Commands (No-Script) – (Probably Not the Best)

    1. Create a new column in the CSV with Excel called “Update Command”
    2. Set the formula o the cell to: = ="update ap set notes = '" & G2 & "' where ap.id =" & D2 & ";"
      1. G Column being the “New Notes” in my case
      2. D Column being the “AP ID” in my case.
    3. I replicate the formula for every device in my CSV.
    4. I copy the commands in small bulks into Airwave CLI.

    There are several ways to do this. A simpler one without needing the AP.ID would be to do a ‘update ap set notes = ‘Switch7 – Port Gi7/2 – XXX’ where ap.lan_mac=’XX:XX:XX:XX:XX:XX’.