AIOps

 View Only

AIOps Bitesize: Are your Topology Manager relationships as stylish as a Ferrari Formula 1 car?

By Matthew Duggan posted 8 hours ago

  

What and why?

A picture paints a thousand words and IBM Cloud Pak for AIOps Topology Manager does just that by showing your resources, their state, how they're related and how they change over time. 

A standard topology view depicts resources and relationships but we can do better than that. What if not all relationships are equal? What if you need to visually distinguish that one instance of the same resource or relationship type is somehow different to another?

In this AIOps Bitesize, we'll use Topology Manager's JavaScript-based styling capabilities to build a 'weather map' that provides better visibility. For inspiration, check out the recent announcement about IBM partnering with with Ferrari at https://www.ibm.com/sports/ferrari

Let's Go

We'll use the DNS Observer to provide data for this article. The DNS Observer builds small topologies that let you understand how your DNS service is resolving names to IP addresses,  IP addresses to names and crucially how long it takes to do it. As you'll see, we can get some good visibility of your DNS service behaviour. 

Check out the product documentation at these links for this AIOps Bitesize:-

TOP TIP: As an example of a recursive DNS Observer job, let's say we do a forward lookup of ferrari.com. That lookup should return one or more IP addresses but those IP addresses don't necessarily resolve back to ferrari.com - they might resolve to another name, which in-turn resolves to other IP addresses. Through recursive lookups we can build up an accurate picture of how a DNS server is configured for a given name or IP address. 

1. Configure a new DNS Observer 'forward' job. Here we're going to ask our OCP clusters' DNS service to do a recursive lookup of ferrari.com and run the job every ten minutes with a schedule.

2. Save the job, search for Ferrari in the Resource Management page and you'll see something like the following. These are the resources that the DNS Observer job created and they represent the DNS server that was queried, the command (lookup) that was done and the IP addresses and names returned by those lookups. 

3. Looking at the topology from ferrari.com we can see that it's actually pretty complex at the time we looked. It resolved to a few IP addresses which in-turn resolved to some cloudfront.net names and back.  Can we make this view better?

4. 'resolved' relationships represent what we asked the specified DNS server for and they provide some really useful data about those lookups. We'll use some of this data to make our view much more informative. 

5. Let's assume that our business requirement is as follows:-

  • if a lookup took less than 20ms, then style the relationship to be green and low thickness. 
  • if a lookup took less than 70ms, then style the relationship to be orange and medium thickness. 
  • Otherwise, style the relationship to be red and high thickness. 

To do this, navigate to the Topology viewer -> Topology configuration -> Relationship types page and edit the 'resolved' relationship type. Configure the line colour and line thickness functions based on the following JavaScript and save the changes. 

if(asmProperties.hasOwnProperty('lookupTimeMs')) {
    if(asmProperties.lookupTimeMs < 20) {
        return 'green';
    } else if (asmProperties.lookupTimeMs < 70) {
        return 'orange';
    } else {
        return 'red';
    }
} else {
    return '#000000';
}

6. Turning back to the topology is now like turning a light on!  Looking at our topology, we can now see that one of the lookups took 98ms.

TOP TIP: You can use the timeline to explore how your DNS server responses have changed over time. 

Final Thoughts

In this AIOps Bitesize, we used Topology Manager's dynamic styling capabilities to provide better insights into an already informative topology view. You can use simple styling controls to tailor how resources and relationships are displayed at the click of a button. For more advanced use-cases, you can use JavaScript functions to evaluate your resource and relationship data to automatically change how topology relationships and resources are shown.  For relationships you can use JavaScript functions to control relationship labels, colours, width and pattern. For resources you can use JavaScript functions to control icon, label, label length, shape border colour, pattern, background colour and size. 

What would your scenario be?

0 comments
1 view

Permalink