Network Management

last person joined: yesterday 

Keep an informative eye on your network with HPE Aruba Networking network management solutions
Expand all | Collapse all

Get list of all down APs outside Airwave

This thread has been viewed 1 times
  • 1.  Get list of all down APs outside Airwave

    Posted Jan 05, 2015 06:22 AM

    Hi.

    I need to access some real time data from Airwave outside the Airwave environment eg. list of all down APs, loaded into another website (NMS).

     

    I thought of a simple HTTP GET request:

    I dont want the whole airwave page loaded into my other website, so when requesting all down APs in Airwave i found the request behind the scenes that produces all data as json:

     

    https://10.x.x.x/api/list_view.json?list=ap_list_down&fv_id=39&ap_folder_id=1&expand_all=1


    So far so good... However this gives me troubles with authentication and also I am refused to display data from outside Airwave "because it set 'X-Frame-Options' to 'SAMEORIGIN'"


    Edit: Is it possible to get the list in jsonp data format instead of json? This way i may bypass the X-origin policy with my AJAX request

    or

    Is it possible to change the access control header from the server?

     

    I also tried to set  up a trigger when an AP goes down/up, and then send a SNMP Trap to the NMS. However this only tells me that an AP went down/up and it does not produce a list of all down APs. It would be a painful workaround to set up rules in my NMS to compute whether or not a specific AP is down right now based on the traps.

     

    Airwave seems like a pretty closed environment, so is my approach wrong, or is it impossible right now?



  • 2.  RE: Get list of all down APs outside Airwave

    Posted Jan 05, 2015 09:53 AM

    Hi Friend,

     

    Airwave won't send any list of down AP information to external NMS , it will trigger an alert when AP goes down and forward it to NMS or email.
    If you want to know the down AP list, then you need to filter the output at NMS side. 
     
    Please feel free for any further query on this.


  • 3.  RE: Get list of all down APs outside Airwave

    Posted Jan 05, 2015 10:22 AM

    You can access the PostgresSQL database via SSH on AirWave.

     

    This query gives a list of AP's and its status:

     

    dbc "select device_config_name, is_up from ap"

     

     

    You might be able to access the PostgresSQL database remotely if you change the Postgres config...

     

    The database-structure might change in new updates, beware of this.



  • 4.  RE: Get list of all down APs outside Airwave

    Posted Jan 05, 2015 10:43 AM
    in new updates, you will need to modify the pg_hba file to allow outside connections.

    We do it where we monitor APs from the database to present to a dashboard for clients.

    It can be done


  • 5.  RE: Get list of all down APs outside Airwave

    Posted Jan 06, 2015 09:32 AM

    Hi all three.

    Thanks for your suggestions! I will dig into it in soon future and return with my final solution.

     

    Your answers were much appreciated.



  • 6.  RE: Get list of all down APs outside Airwave

    EMPLOYEE
    Posted Jan 12, 2015 01:46 PM

    Is there a reason for not leveraging the existing XML APIs?  You should be able to do something like:

     

    https://<insert.airwave.ip.here>/ap_list.xml?is_up='false'

     

    And then you can parse that xml data to just show whichever data you're really after.



  • 7.  RE: Get list of all down APs outside Airwave

    Posted Feb 21, 2018 01:21 PM

    It doesn't work this way:

    https://<insert.airwave.ip.here>/ap_list.xml?is_up='false'
    https://<insert.airwave.ip.here>/ap_list.xml?is_up=false

     

    It returns all devices. Version 8.2.3.1.

    The online docs show:

    AP List

    URL: https://url/ap_list.xml
    XML Schema: amp_ap_list.xsd
    Parameters:
     Optionally limit information returned to one or more APs by supplying AP IDs.
     Similarly, limit by AP folders, AP groups, and controllers by supplying their IDs.



  • 8.  RE: Get list of all down APs outside Airwave

    EMPLOYEE
    Posted Feb 22, 2018 12:31 PM

    the quotes need to be changed to URL code:

    https://airwave.lab.com/ap_list.xml?is_up=%27false%27



  • 9.  RE: Get list of all down APs outside Airwave

    Posted Mar 21, 2018 01:28 PM

    https://airwave.lab.com/ap_list.xml?is_up=%27false%27

     

    Having the same issue where this query returns all devices. AMP Version 8.2.4. 

     

    Thanks,

    Jesus



  • 10.  RE: Get list of all down APs outside Airwave

    EMPLOYEE
    Posted Mar 21, 2018 03:45 PM

    It sounds like the filtering on the is_up value isn't taking place.

     

    Try creating a custom report to include just the Device Uptime -> Uptime by Device widget.  Then check the setting toggle for only 'limit to devices with device downtime'.  Save the report definition.  Edit the report definition -> get the report_definition_id from the URL.  Run the report dailys and you can hit the report API - https://ampname/latest_report.xml?report_definition_id=###



  • 11.  RE: Get list of all down APs outside Airwave

    Posted Mar 22, 2018 10:54 AM

    After trying to fix (successfully) the buggy and erroneous .xsd files, I decided that Aruba doesn't care much about their external API. So I resorted to their internal API used by the web portal itself. It works very good and provides the much modern JSON replies:

     

    /api/list_view.json?list=ap_list_down&fv_id=0&ap_folder_id=1&expand_all=1&page_length=99999&sort_col=name&sort_descend=false&start_row=0

     

    It requires the same kind of authentication cookie as for the external API...



  • 12.  RE: Get list of all down APs outside Airwave

    Posted Feb 20, 2019 11:39 PM

    Thanks for the hint! -- this is what I needed to be able to extract UCC information that is unavailable via the External API

     

    /api/list_view.json?fv_id=0&selected_view_index=0&sort_col=start&sort_descend=true&call_type=all_calls&quality_type=wlan&page_length=99999&list=ucc_calls_list"

     



  • 13.  RE: Get list of all down APs outside Airwave

    Posted Mar 05, 2020 05:13 PM

    That was great, thanks Sergey. Anyone happen to know how to get another view than the default view for this JSON reply?

    For instance, I'd like to get "Last contacted" in the JSON as well



  • 14.  RE: Get list of all down APs outside Airwave
    Best Answer

    Posted Mar 09, 2020 04:59 AM
      |   view attached

    I figured it out.

    Change the fv_id=0 to your own view number in Sergeys URL. In this case it would be fv_id=167 (see pic)