How often do you find yourself doing the same set of commands when troubleshooting issues in your network? I am willing to bet the answer to this is: quite often! Usually we have a list of our favorite commands that we will always use to quickly narrow down a specific problem type.
Switch reloaded unexpectedly? "show reload cause"
Fan failure? "show environment power"
Fiber link reporting high errors or down on your monitoring system? "show interface counters errors", "show interface transceiver", "show interface mac detail"
Outputs like the above examples help you quickly pinpoint the source of your failures for remediation. SSH'ing into the boxes and running these commands by hand is time consuming, especially if you are for example a NOC dealing with numerous failures throughout the day. Most switch platforms have API's now and you can instead program against them to get these outputs in seconds. We will go over a variety of examples and creative ways to use these scripts for optimal use of your troubleshooting time and to get you away from continually doing these repetitive tasks by hand.
NOTE: The tutorial examples will be using python and the Arista pyeapi module with Arista examples, but the concepts can easily be transferred to other platforms and languages.