Hello everyone. Once more, trying to inset automation in maintenance tasks, after we performed a DC upgrade at the company network, separating DC/Campus networks, we needed to clean up a lot of vlans from the campus networks. I came up with this script to play around, make the task more interesting and also avoid repetitive…
Category: IT
Using netmiko with NTC-Templates to gather data into for DC migration – Produce cisco configuration commands from Excel file
One month ago, we were migrating our DC core from older Cisco Catalyst models to Nexus models in 2 different DCs, connected over WDM, a longtime plan to provide a better foundation for networking services in our environment (+OTV, MacSec, etc). One of the plan’s main ideas was to separate user and DC networks and…
Python Script to process Prime LMS report for reclaiming Unused Up ports from legacy Cisco switches
In our previous attempt we created a script that took a prepared text file containing switches ip addresses and ports to be switched to a dummy vlan, preventing access for anyone connecting without permission. In this one, we will take a “Reclaim Unused Up” report that is created from Cisco Prime LMS, the well known…
Python Script to change inactive cisco switch ports to a dummy vlan
I am working on this script for a repetitive task we do at work. We often do a scan for inactive ports in building switches and if they are inactive for a long time, we set them to a dummy vlan that offers no ip connectivity to anyone connecting to it and turning on the…
Python script to search for certain mac address in Legacy Cisco enabled Campus LAN + Some History on my relationship with Network Automation
Introduction Hello all. It’s been some time now that I have started learning about network automation/programming through the Cisco DevNet channel, learning about NetDevOps, CICD and all those magical notions, presented by various incredible people on the Cisco Devnet Team. Automation with Network Devices is not new to me. I have been experimenting for a…
Ansible Playbook for upgrading Ubuntu based Nagios Server to latest version
Use Ansible to upgrade your Nagios Server
Blog maintenance
I was forced to update my blog and delete a few old posts as I am preparing to post some work related (IT) material in twitter pointing here.Most deleted posts concern old work interests and World of Warcraft links.The material to be posted will be about Nagios, Ansible, Python, and Automation in general.
Εγκατάσταση Nagios 4.1.0 σε Ubuntu Server 14.04.3 LTS με plugins, check_nrpe, check_esxi_hardware και nagiosgraph
Σήμερα έπιασα ξανά το θέμα του upgrade σε Nagios 4 και έμαθα ότι στις 18/8 (χθες) βγήκε το Nagios 4.1.0 stable. Ξεκίνησα (μετά από δοκιμή για upgrade) ένα clean install στον ubunagios03 με εγκατάσταση από την αρχή του Ubuntu Server 14.04.3 LTS και nagios core 4.1.0 & nagios plugins v.2.1.1 Πρώτα ενεργοποίησα το χρήστη root…
Copy & Paste with vim
These are the sources: http://stackoverflow.com/questions/4620672/copy-and-paste-content-from-one-file-to-another-file-in-vi http://vim.wikia.com/wiki/Cut/copy_and_paste_using_visual_selection http://www.tech-recipes.com/rx/219/copy-and-paste-text-with-vi-or-vim/ Since you already know how to cut/yank text, here are a few ideas for pasting it back into another file: Edit the first file, yanking the text you want. Then open your second file from within vi (:e /path/to/other/file) and paste it Open both files together in a…
vim search and replace commands
If you want to match something at the end of the line you need to use the $ character at the end of the string pattern. The following are taken from : http://www.linux.com/learn/tutorials/8255-vim-tips-the-basics-of-search-and-replace Let’s start by looking at searches and doing search and replace operations within Vim. You can do a search in normal mode…