This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

YAML IOSXR Inline & Offline Analysis Incident/Event Management

This Ansible project help to do inline analysis while an incident triggered on network level, for testing simple commands have been taken to analyze and output results are conditional which pin point alarming situation

Offline Analysis can also be doable as outputs saved in CSV file on completion of running playbook

All needed files have been uploaded, for case base secanrio can be demonstrate on GNS3

Requirements

ansible 2.5 or later 2.7.10

GNS3

xrv-k9-5.3.1

Language

YAML

License

GPLv3

Prerequisite Steps to accomplish Inline & Offline Analysis for Event/Incident Management are below

  • Ansible Controller installed either on Redhat (Centos7) on top of VMware Workstation or in Windows but it lengthy process to setup
  • GNS3 with IOSXRv capability, - GNS3 Topology uploaded
  • Configuration for IOSXR added in folder "Topology_IOSXRv_Ansible" this will help to setup IOSXR enviorment
  • Logical connectivity between Ansible controller and GNS Nodes (IOSXRv) are must
  • Name resolution either via DNS or via local Host file, I used host file which added as well but for enterprise or SP we need for sure DNS capability
  • Make sure Interfaces are manually configure on Controller, DHCP should be disable as host file need to alter on each change
  • In case code need to modified i am using ATOM, you may use any one of your choice

Command

time ansible-playbook IOSXRtest.yml >>>time help to find out how quick code implemented in running environment to acquire desire results

Note

Shared code designed on basic commands but we could moderate or enhaned this code and build multiple scenarios on base of our routine case studies on networks or technologies
,added YML Playbook can be import in CMLv2

Result

[root@osboxes9 ansible]# time ansible-playbook IOSXRtest.yml

PLAY [XR Router Troubleshooting]

TASK [Core Troubleshooting Commands]

ok: [IOSXR_West] => (item=show clock)

ok: [IOSXR_West] => (item=show platform)

ok: [IOSXR_West] => (item=show redundancy)

ok: [IOSXR_West] => (item=show proc cpu | ex "0% 0% 0%")

ok: [IOSXR_South] => (item=show memory sum location all | in "node|Pyhsical|available")

ok: [IOSXR_South] => (item=show int description | i down)

ok: [IOSXR_South] => (item=show log | i, ch)

Sample of Desired Output

TASK [Platform Hardware Check]

skipping: [IOSXR_South]

skipping: [IOSXR_West]

TASK [Redundancy Check]

ok: [IOSXR_West] => {

"msg": "IOSXR_West show_redundancy indicates card is not present: "

}

ok: [IOSXR_South] => {

"msg": "IOSXR_South show_redundancy indicates card is not present: "

}

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    IOS XR
  • Programming Languages

  • License

    Other

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.