Wired

last person joined: 11 hours ago 

Bring performance and reliability to your network with the Aruba Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of the ArubaOS-Switch and ArubaOS-CX devices, and find ways to improve security across your network to bring together a mobile first solution.
Expand all | Collapse all

CLI include with multiple patterns

  • 1.  CLI include with multiple patterns

    Posted 18 days ago
    Hello,

    I'm currently using AOS-CX 10.5 on an Aruba 6300 and 6405.

    I've been having problems trying "grep" for multiple patterns on a single command line.

    For example, if I do a "show lldp neighbor | include '<pattern1>', 'pattern2'",  it reports "Command not supported".

    What is the correct syntax for the command line so you can include multiple patterns?

    Thank you,
    rickr

    ------------------------------
    rickr
    ------------------------------


  • 2.  RE: CLI include with multiple patterns

    Posted 17 days ago
    Hi Rick, IIRC the chaining could be done this way (example):

    show lldp neighbor | include <PATTERN-STRING-1> | include <PATTERN-STRING-2>
    Reference (example): ArubaOS-CX 10.5 Command Line Interface Guide for Aruba 8320 8325 Switch Series (Edition 1 July 2020).

    ------------------------------
    Davide Poletto
    ------------------------------



  • 3.  RE: CLI include with multiple patterns

    Posted 14 days ago
    Hello David,

    Apparently, this command does not work.

    According to tech-support, searching for multiple patterns is not supported from the same output.

    This command "show lldp neighbor | include <PATTERN-STRING-1> | include <PATTERN-STRING-2>"
    looks into two STDOUT.

    STDOUT1 from the "show lldp" command, and STDOUT2, from the out of "include <PATTERN-STRING-1>"

    I need it to REGEX two patterns from the same STDOUT1

    I've requested this as  a feature request.  But who knows if this will go in.

    Thank you for your response.
    rickr



    Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s).  It may contain confidential and privileged information, such as health information or trade secrets, that may be restricted from further use or disclosure by state and federal law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately contact the sender by reply e-mail and destroy all copies of the original message.  Thank you.





  • 4.  RE: CLI include with multiple patterns

    Posted 14 days ago
    Use API (and PowerArubaCX) ;-))


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

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

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

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



  • 5.  RE: CLI include with multiple patterns

    Posted 14 days ago
    4 comments.

    0) Thank you for your response.

    1) Powershell is prohibited in our environment due to security concerns

    2) Using an API is not conducive to CLI real-time debugging. Unless a person writes a toolset, that is a bigger task than what I am looking for. And it would need to be flexible and dynamic for the scenarios perceived/defined.

    3) Do you have a PYTHON equivalent of your Powershell API?  If so, what are the links to get you started.

    Kind Regards,
    rickr

    Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s).  It may contain confidential and privileged information, such as health information or trade secrets, that may be restricted from further use or disclosure by state and federal law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately contact the sender by reply e-mail and destroy all copies of the original message.  Thank you.





  • 6.  RE: CLI include with multiple patterns

    Posted 9 days ago
    Yes, there is also pyaoscx

    you can look https://developer.arubanetworks.com/aruba-aoscx for more info

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

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

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

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