Wireless Access

last person joined: yesterday 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

scripting langauge for AP commands!

This thread has been viewed 7 times
  • 1.  scripting langauge for AP commands!

    Posted Apr 16, 2014 09:24 PM

    Hello everyone,

     

    If anyone could help me with the following I would be very thankful. So far I have found this site to be full of knowledgable people!

     

    1- What language could a network manager use to write the script for a potential function whose psedocode is the following:

    show ap monitor ap-list ap-name <name of the ap>
    for each one of the specific AP's
      do:
      show ap arm state specific-ap-name <name of the specifi ap>

    2- Also, how would we write the loop in the above example?

     

     

    If there is any confusion with the question, don't hesistate to send me a private message. Thank you,

     

     

    Henry S. 



  • 2.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Apr 16, 2014 09:30 PM

    I would use Airrecorder:  Login to support.arubanetworks.com go to Tools> Airrecorder Folder



  • 3.  RE: scripting langauge for AP commands!

    Posted Apr 17, 2014 09:02 AM

     


    @cjoseph wrote:

    I would use Airrecorder:  Login to support.arubanetworks.com go to Tools> Airrecorder Folder



    What does one need to do to make Airrecorder show up under as a downloadable option? When I follow your link it just has an option to "Folder Up" and "Mail Documents".

     

     



  • 4.  RE: scripting langauge for AP commands!

    Posted Apr 17, 2014 09:18 AM

    @networknewb wrote:

    Hello everyone,

     

    If anyone could help me with the following I would be very thankful. So far I have found this site to be full of knowledgable people!

     

    1- What language could a network manager use to write the script for a potential function whose psedocode is the following:

    show ap monitor ap-list ap-name <name of the ap>
    for each one of the specific AP's
      do:
      show ap arm state specific-ap-name <name of the specifi ap>

    2- Also, how would we write the loop in the above example?

     

     

    If there is any confusion with the question, don't hesistate to send me a private message. Thank you,

     

     

    Henry S. 


    Without knowing anything about Airrecorder; I would use Perl and a foreach loop. Where are you getting the names for <name of the specific ap>? Are you attempting to get it from show ap monitor ap-list ap-name <name of the ap> or using the same ap-name for both statements? When I run that command I only get back the bssid of the AP that it hears. If you want to get the ap-name from that command you may have to limit the result to | include valid and then pump that result into show ap bss-table | include <bssid> and then you can get the name to use in the show ap arm state ap-name command. It looks like the most complicated part would be to regex the values you want out to feed into the next command.

     

    You can reference a perl tutorial I did to get you started: [Tutorial] Running CLI commands remotely using Perl Jan14-Tutorial

     

    Again, I've never used Airrecorder so it may provide a more elegant solution.

     

    Hope this helps,

     

    Rosie

     

     

     



  • 5.  RE: scripting langauge for AP commands!
    Best Answer

    EMPLOYEE
    Posted Apr 18, 2014 06:28 PM

    On AirWave, there's a script (written in perl) called on_controllers that's a good starting point for this.  By default, it sshes into all controllers and runs one command, then prints the output and optionally emails it.  It's pretty easy for somebody with some programming know-how to update it to do other stuff.



  • 6.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Apr 23, 2014 11:26 AM

    An initial tutorial for Airrecorder is here:  http://community.arubanetworks.com/t5/Community-Tribal-Knowledge-Base/AirRecorder-Tutorial-Part-1/ta-p/157646

     

    The Application is here:  Login to support.arubanetworks.com go to Tools> Airrecorder Folder



  • 7.  RE: scripting langauge for AP commands!

    Posted Apr 23, 2014 03:32 PM
      |   view attached

    thanks; it would be wonderful if you could point the exact url from which I could download the AirRecorder-1.2.16-release.jar.

     

    I attached a screenshot of what I see when I navigate to the download link you provided.

     

     



  • 8.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Apr 23, 2014 03:33 PM

    You need to login to the support site.  Unfortunately, they show the folder for un-authenticated users, but they should show the login.  Let me see what I can do about this....



  • 9.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Apr 23, 2014 04:02 PM

    Okay, you need to login to the support site, then go to Tools> Airrecorder Folder.  Let me change the post.



  • 10.  RE: scripting langauge for AP commands!

    Posted Apr 23, 2014 04:05 PM

    The Air Recorder folder still has no files/ listed for my account. Is there something that I need to do in order to gain access to that tool?



  • 11.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Apr 23, 2014 04:09 PM

    Rosie,

     

    Does it say that you are logged in?  Please PM me with the email address you use to login to the support website.

     



  • 12.  RE: scripting langauge for AP commands!

    Posted May 29, 2014 11:45 AM

    Hi,

    I've the same problem with Air Recorder: I can't download it. Plese help me.

    Regards,

    Luis Bedregal



  • 13.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Jun 02, 2014 09:55 AM

    @lbedregal wrote:

    Hi,

    I've the same problem with Air Recorder: I can't download it. Plese help me.

    Regards,

    Luis Bedregal


    please try now, the permissions were set to "tools" - which not so many users have, I have made it "registered users".

     

    -jeff



  • 14.  RE: scripting langauge for AP commands!

    Posted Jun 02, 2014 10:14 AM

    Thanks.. :smileyvery-happy:

    Luis Bedregal



  • 15.  RE: scripting langauge for AP commands!

    EMPLOYEE
    Posted Jun 02, 2014 10:11 AM

    Hello all,

     

    Just wanted to write some words on AirRecorder usage (or any script for that matter). When running scripts against a production system, it's always good to consider some 'what ifs' and adhere to some best practice before you unleash your creation :smileyhappy:

     

    > test test test... in a lab or anywhere else where it's ok for something to go wrong. Whether it's 3 lines or 300 lines, test it in the lab first, because you surely dont want to find out that the single apboot command actually was a typo for reboot on the controller etc.

     

    > some CLI commands send a request to the AP and wait for a response - radio stats, ap debug cilent-table are examples -  what if the network or connection to the APs is not stable ?  Perhaps you have seen before when a AP is non responsive say during reboot or upgrade etc, if you try to run a CLI command against it, it will take some time to timeout. What is going to happen to your script if this happens ?

     

    > don't automate lengthy output commands - for example, 'show ap tech-support' is something that would not be desirable to script. Besides, it is but a series of CLI commands itself, so dig out the one(s) you are interested and script them directly.

     

    > Controller CLI only supports 8 concurrent SSH sessions, a hung ssh session takes some time to timeout. Airrecorder will connect once and sit there running commands, but you could also write AirRecorder to connnect and run a one time command, sleep and then connect again (i.e. wrap it in a shell script, cronjob etc). Care and consideration must be given in the case where AirRecorder is continually logging in and logging out - what happens if you lock out the controller SSH ? One sideeffect is that Airwave will fail to login.

     

    > Be a nice CLI user... Whilst a script can execute commands "as fast as the controller can take them" - humans don't (usually) work as fast. This means it is easy to create a load on the controller that is not represenative of the usual steady state. That may or may not be a bad thing, but consider an example where you are trying to watch CPU load. The more frequently and faster you start use the CLI, the more CPU you are actually going to use - it's going to skew your result. Hence, your data collection intervals should be chosen carefully.

     

    AirRecorder supports a handy CLI option --post-command-delay <delay in ms>  to allow some breathing room after each command. On a heavily loaded production system, it would be advisable to use something like 100ms, 200ms (typical). Of course there may be a legitimate reason to run the commands as fast as possible, or the #ap x command delay is too long (remember that AirRecorder is syncronous), but slower is better !

     

    regards
    -jeff