Tips for Formatting Datacenter Automation Output
The "Datacenter Automation Utilities", also known as DCA, PowerPack includes run book automation and action policies that assist with general-purpose activities for other installed Automation PowerPacks. Within this powerpack there are multiple RunBooks that assist you in formatting the output of the data. This includes prettifying the data for the SL1 UI or formatting the data to send to other systems such as ServiceNow. This is already configured for Out-of-the-box automations, but there are a few things to consider when using your own commands. With, the data structure must be in a specific format. The data must be passed as a dictionary, the name of the key must be “command_list_out”, the data must be a list of tuples with the tuple containing three objects. The three objects should be: 1. The name of the automation being performed The output of the command/API call/etc. The word “False” or “None”, meaning no further flags need to be passed The RBA output should look something like this for a single command: command = “df -h” (stdin, stdout, stderr) = client.exec_command(command) Output_of_command = stdout.read() EM7_RESULT = {“command_list_out”: [(‘Running df -h’, Output_of_command, None)]} In the above example: “{}” – symbolizes the data structure is a dictionary “command_list_out” – the key of the dictionary “:” – required to separate key and value pair “[]” - symbolizes the data structure is a list “()” - symbolizes the data structure is a tuple “Running df -h” – this is the description of what is being performed, this can be free text and say whatever you would like “,” – separates each index in the tuple “Output_of_command” – this is the output of the command df -h being ran against the device “None” – a requirement that says nothing else to be passed for the custom flags in the python library. The RBA output should look something like this for a multiple command: command1 = “df -h” command2 = “ping -c 15 -i 2 google.com” (stdin, stdout, stderr) = client.exec_command(command1) Output_of_command1 = stdout.read() (stdin, stdout, stderr) = client.exec_command(command2) Output_of_command2 = stdout.read() EM7_RESULT = {“command_list_out”: [(‘Running df -h’, Output_of_command1, None), (‘Running ping, Output_of_command2, None)]} In the above example: “{}” – symbolizes the data structure is a dictionary “command_list_out” – the key of the dictionary “:” – required to separate key and value pair “[]” - symbolizes the data structure is a list “()” - symbolizes the data structure is a tuple “Running df -h” – this is the description of what is being performed, this can be free text and say whatever you would like “,” – separates each index in the tuple “Output_of_command1” – this is the output of the command df -h being ran against the device “Output_of_command2” – this is the output of the command ping being ran against google.com “None” – a requirement that says nothing else to be passed for the custom flags in the python library. Note: The difference with the multiple commands versus the single commands are the extra tuple. Meaning that after the first parenthesis is closed off a comma can now be passed to start the new tuple with the new output of commands.28Views2likes0CommentsInnovators Awards - Final Use Case Showcase: Get Inspired by Cisco
NOTE: AWARDS APPLICATIONS CLOSING THIS WEEK! Enhancing Enterprise Efficiency with Cisco Managed Services Background The surge in remote work and the proliferation of connected devices have heightened the need for advanced solutions that offer improved network visibility, faster incident resolution, and streamlined management processes. Challenge Enterprises have struggled with visibility over their networks due to the rise of hybrid cloud environments and the complexity of managing multiple devices. Cisco Managed Services was not alone. Traditional support services often failed to address some of these emerging needs, leading to increased downtime and diminished user experience. Solution In the culmination of an 18-year ambition, Cisco Managed Services has enabled end-to-end network visibility and automated intelligence-driven correlation and remediation to deliver a better user experience for their enterprise clients. With visibility, event correlation, and workflow automation enabled by SL1, they developed automated steps to diagnose and resolve the most commonly occurring problems across the client base. This innovative solution, Virtual Engineer, frees their engineers to work on innovation instead of manual, repetitive tasks. Results The implementation of Cisco Managed Services resulted in significant improvements: Enhanced Visibility: Enterprises gained comprehensive insights into their network performance, leading to timely issue detection and resolution. Reduced Mean Time to Resolution: Mean time to restore incidents decreased from 351 minutes to just 2.4 minutes, significantly enhancing productivity. Automation Savings: With over 280,000 hours saved through automation, engineers could allocate their efforts towards higher-value initiatives. Cisco's Managed Services exemplify how innovation in technology and automated processes can transform enterprise operations. By leveraging these solutions, businesses gain the agility to respond efficiently to challenges. The lessons learned and best practices shared by Cisco provide valuable insights for organizations looking to integrate AI and automation into their operations. Applications are closing this week! You too can join the ranks of tech innovators who are shaping the future of enterprise operations. Don’t delay. Apply for the Innovators Awards today!