cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
166
Views
1
Helpful
0
Comments
Tsubasa Kanai
Cisco Employee
Cisco Employee

Introduction

We published the CLICommandCollector App and it was introduced in another document. Although the app enables users to search CLI commands and collect command outputs from multiple ACI nodes in parallel, we have a feature called 'Import' to collect CLI outputs in more efficient ways. We introduce the feature and the format of a custom import file using an example.

This document assumes that you have already installed the App on your APIC and saved the credential as documented in Prerequisite in the previous document.

YAML format to be imported

Once you open up an CLICommandCollector App on your APIC, navigate to Import menu on the left pane. The import feature accepts YAML format that contains node & command info for which you want to collect outputs. If you are unsure what format is supported, although you can type in the textarea directly or select a file to be imported from the "Choose import file" button, use the "Sample Format" in the right. Once you click one or more sample format(s), it will be reflected to the textarea as the screenshot below.

Screenshot 2024-01-19 at 13.18.21.png

I believe that the YAML format is pretty straightforward and contains information like on which node the following commands are collected (node-list), which command/shell types are used (shell-type), and which commands are executed on a given shell type on given nodes (command).

# Supported YAML format
- node: [node-list1]

shell-type1:
- command1
- command2
- ...
shell-type2:
- command1
- ...

-
node: [node-list2]

...

 

Following command/shell types are supported on the App.

  • APIC: moquery, show, acidiag
  • Leaf: ish, vsh, vsh_lc
  • Spine(Box): ish, vsh, vsh_lc
  • Spine(Chassis): ish, vsh, linecard, fabric module


As an example, by modifying the sample format, let's make a custom import file to check basic node status on each node of 3 APICs (1,2,3) and two switch nodes (101, 103). Let's say this YAML file is saved as hw_check.yml and we use it in the next section.

- node: [1, 2, 3]
  acidiag:
    - acidiag avread
    - acidiag fnvread
  show:
    - show versions
    - show controllers
    - show switch

- node: [101, 103]
  ish:
    - show version
    - show environment
    - show diagnostic result module all detail
  vsh:
    - show logging onboard internal reset-reason

 

How to use Import feature

Once you prepare for a custom import file, click the "Choose import file" button and select the file.
Screenshot 2024-01-19 at 13.33.36.png

Then, the content should be reflected to the textarea under the button as above. You can modify the textarea if needed. Then, click the Next button and review the selected nodes and commands before submitting it.
Screenshot 2024-01-19 at 13.33.58.png

Once you click the Submit button, the request is sent to the backend on the App and it automatically accesses each node to collect given command outputs in the same manner as the Command Selection menu. UI automatically moves to the Result menu after command collection is completed.
Screenshot 2024-01-19 at 13.34.42.png

Then, you can look at the collected logs on the GUI by selecting nodes or download them using the Download All button for offline analysis. Following screenshot shows logs for two leaf nodes on the GUI.
Screenshot 2024-01-19 at 13.35.34.png

Conclusion

As we walked through the example above, we can easily create a custom import file and collect logs defined in the file. Advantage of the feature is that we can use the same custom import file multiple times for the same node set and the same command set by making the file only once. This will be helpful if you pre-define command set for specific node set for monitoring or troubleshooting purposes.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking for a $25 gift card