Developer

 View Only
  • 1.  Link State (Aruba CX) with API

    Posted Jan 17, 2025 06:37 AM

    Hi,

    When you use show interface on Aruba CX, there is Link State with info about "uptime" of the port

    Interface 1/1/1 is up
    Admin state is up
    Link state: up for 2 months (since Thu Nov 07 09:31:29 UTC 2024)

    I search on the API call but no found where is this value... 



    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------


  • 2.  RE: Link State (Aruba CX) with API

    Posted Jan 17, 2025 01:18 PM

    Hi Alex.

    In 10.15. you have link_state, link_state_aggregate, link_state_hw available in Interface GET API.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2024
    ------------------------------



  • 3.  RE: Link State (Aruba CX) with API

    Posted Jan 17, 2025 01:41 PM
    Edited by GorazdKikelj Jan 17, 2025 02:14 PM

    Looks like you will need to calculate link up time. You have link_resets_timestamp. I belive that you just subtract this value from current unix time.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2024
    ------------------------------



  • 4.  RE: Link State (Aruba CX) with API

    Posted Jan 17, 2025 02:16 PM

    Oh yes... 

    Need to have API 10.13... we can't (yet) use pyaoscx...

    but timestamp look strange (not unix time...)



    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 5.  RE: Link State (Aruba CX) with API

    Posted Jan 17, 2025 02:21 PM

    Yes. It's not timestamp but difference you need to subtract from current timestamp to get the correct timestamp when interface was transition to online.

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2024
    ------------------------------



  • 6.  RE: Link State (Aruba CX) with API

    Posted Jan 17, 2025 02:24 PM

    It's also available in 10.13.

     link_resets_timestamp, link_speed, link_state, link_state_aggregate

    Best, Gorazd



    ------------------------------
    Gorazd Kikelj
    MVP Guru 2024
    ------------------------------



  • 7.  RE: Link State (Aruba CX) with API

    Posted Jan 19, 2025 04:33 AM

    It's also available in 10.13.

     link_resets_timestamp, link_speed, link_state, link_state_aggregate

    Yes, link_resets_timestamp is not available before 10.13



    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 8.  RE: Link State (Aruba CX) with API

    Posted Jan 19, 2025 04:35 AM

    It is worse, because it is the number on seconds from start on the switch... (and last reset of the port)

    you need to get timestamp of switch boot :)



    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------