Using tags for something interesting

Hello all

Thought I would try and share a bit of what I have been working on internally for a while now. As we are an organization that is still does not have all processes and data management in place I have been working on rewriting an Python based page I hacked together with a colleague to list information about initially virtual machines but it grew to include DNS, physical machines, NAT relations as well as relying on ARP data to resolve MAC to IP where needed. I finished version 1.0 of this new system written in Django 1.10 a few weeks back and am already working on a 1.1 release with a few feature requests.

Now the system grew out of a need to identify people and relations around virtual machines in our infrastructure and today heavily relies on Tags in the web client. We were already using tags to include VM’s in backup jobs in Veeam (something I can highly recommend doing!).

So what and how do we do it? We use 5 tag categories with the names Owner, Department, SysAdm, AppAdm and Service. These 5 tag types give a lot of information directly on the VM on who to contact and what service the VM belongs to. This information is then on a daily basis exported to the new system in the form of a CSV file at the moment. This CSV file along with a file from our NAT device, on from the datacenter routers with ARP, a list of DNS records, a CSV file from our Racktables installation for physical machines where the 5 tag categories are also defined and a list of systems with the SCOM agent installed.

The data is then imported into a data model defined in Django’s Object-relational mapping that tries to correlate some of the information from the different files. The end result is a web page where all systems and DNS records in theory are listed and can be searched, filtered, sorted etc. Where one can find a system(physical or virtual) based on the IP, DNS record (A, CNAME or MX), name, type, OS, you name it. This has some of the characteristics of a CMDB or CMS but instead of showing what it should be it is showing what it actually is at the time of the latest export. We have used this to help ourselves in the Infrastructure department as well as allowing some supports to find information to help route incidents and service requests to the correct groups in our service management system.

Below I have included a blurred screenshot from the system to show one of the views defined. A cut out from a simple system list. Note that the last 5 columns are the tag categories from vSphere/Racktables with the danish names we chose for them.

So that is an example of how we use tags in our day to day operations. We still in some cases miss the old Custom attributes (I know they are still in the API but not exposed in the web client) with the option of inputting variable information like expiry dates etc. Having to do something like that with tags would in my opinion be a mess (imagine a tag for every single date of expiry).

A bonus of doing this you can actually correlate this information with information from vRops via e.g PowerCLI. As an example one could send an email based on an alert in vRops to the addresses set via the SysAdm tags.

Racktables: Datacenter Management

Hello All,

Today I will be doing a little write up about a piece of software that is not related to VMware. Shock! But something that is related to the infrastructure that you need to have your VMs running.

We have for a while now had our cable management and rack space management in several Excel worksheets. This is far from optimal! We ended up using Excel worksheets because coming from a decentralized IT environment to a central one, all of the locally used tools were not scaling to the size or use case we needed. So in lack of better a few Excel worksheets were thrown together “until a solution was found”.

These few Excel worksheets became more worksheets and those became even more worksheets. At some point you just get sick of worksheets! Trying to manage thousands of cables and ports in a worksheet and managing rack space the same way was not even remotely entertaining. We needed something more!

Racktables to the rescue!

A colleague of mine was setting up some new equipment and started wondering if there weren’t any simple free tools for handling this instead of the rack space worksheets. He stumbled upon Racktables and showed it to me. It looked promising but as no resources were allocated to finding a replacement for the worksheets getting traction on a new tool was close to impossible.

So as all great tools in an IT department – this started under the radar! I installed Racktables 0.20.8 and a few plugins (Link Management is a MUST) and started playing with it in the fall of 2014 and after adding a few devices and racks I showed it to my team lead. He was impressed but still no resources.

Later on my colleague had to do some documentation for a user outside of IT and decided to add all the user’s servers and network connections and used Link Management’s ObjectMap as part of the documentation. This was the first real use.

Months went by and at a few team meetings discussing documentation of our server rooms I mentioned the software and that it was ripe for use. My team leader was getting convinced slowly.

And the suddenly a few months ago he put one of our trainees on the job of moving everything from our rack space worksheets into Racktables with the goal of eliminating the worksheets. Yay! Finally some traction.

Our trainee input everything from the worksheets and then summer holidays hit. So as me being the young guy in the office I have been working for the first part of the main vacation weeks. I have been double checking the inputted data in Racktables and making updates to where needed.

During this time I have had a lot of talks with the architect in my team who has been working on eliminating our cable worksheets and I showed him what Racktables could do in this regard. Within a day of playing with it he was pretty much hooked and has been documenting large parts of our fibre infrastructure.

We have last week and this week been showing it to the team responsible for mounting and connecting devices in our infrastructure and they are also pretty impressed with what this simple tool can do.

The juicy stuff – what does it do!

Now I have been talking about how we started using this tool but now what can it actually do? From the front page of their site:

Racktables is a nifty and robust solution for datacenter and server room asset management. It helps document hardware assets, network addresses, space in racks, networks configuration and much much more! –

It has functionality for managing racks in different locations and rows and sizes. Objects that can be mounted in racks and connected to other objects. IPv4 and IPv6 address management. IP SLB and 802.1Q (VLAN) management. It can even track your virtual infrastructure and has a built in patch cable database for inventory.

From a programming perspective it is a highly modular yet implemented in quite a simple way building on a MySQL database. Its about ~35 PHP files and ~75 tables in the database.

Most all of the logic comes from the Dictionary in which you can define Object Types, server, switch, router, software etc models and even add your own types and sub types. Attributes can be attached to ObjectTypes to expand on the info of an object. It is possible to define Parent-Child relationships between object types and also defining port types, connector types and how they are compatible with each other.

Racktables comes with a lot of things defined in the dictionary by default and those are a great basis for starting out. You will probably soon realize that a lot of the objects you have don’t exist but with the simple setup it is VERY easy to add them.

Racktables can also be extended with plugins and there are built in integrations with Cacti and Munin if you use those tools.

There is also support for using CDP/LLDP and SNMP against switches to allow for auto-populating the objects with ports and connections – we have not used this feature.

I can only recommend this tool. It’s interface looks like something that should have been long gone but it just works – even on tablets and any platform and browser because no fancy Flash/Silverlight or Javascript pop in here and there. It’s simple, it’s easy and it just works.

And if you are asking about scalability? We have added over 600 objects in almost 70 racks and have made almost 1000 links between ports and no slowdown has been noticed so far –  and as it is simple just add more resources to your web server to handle the load 🙂