Keeping an eye on your IBM Cloud Platform environment
By: Giulio Montenero
Tags: Containers, Monitoring, Ibm Cloud, Observability, DevOps

IBM Cloud has become huge in terms of services and tools it offers. And sometimes it becomes highly difficult to have a look on what is going on into the infrastructure and more generically the platform we have just deployed.

In this short article we are going to talk about the current observability tools and services we currently have on IBM Cloud Platform that your DevOps teams can easily instantiate and start using by bringing more security, control and simplicity to your architectural platform. We’ll also compare the use of those in regards to the most common deployment models like PaaS, IaaS and CaaS (Container as a Service, more specifically looking at Kubernetes service environment).

A quick overview about DevOps

There is no proper definition about what DevOps is. DevOps is a culture, practice (or a set of practices) largely used in software engineering to make development (Dev) and operations (Ops) teams work closer. It is de facto a new way of thinking.

In software engineering, or in agile methodologies we’ll also explore the best practices to help teams work better and more efficiently. The new DevOps concept is not only about tools, but tools are definitely important to build up a pipeline, automate a job or even a release and go faster into the market.

Everyone is now responsible for the entire lifecycle of not a project at whole, but a piece of that, which can definitely be a product feature, or a smaller project that needs to be released faster and without any impacts. That’s why we need to keep track of our system, architectural components from an operational point of view.

What is Cloud Monitoring

Cloud Monitoring is a method, a process of reviewing, observing, monitoring and managing a typical operational workflow in a cloud-based environment. It is primarily part of cloud security and management processes, and it is generally implemented through automated or end-to-end monitoring software tools that provides central access and control over cloud infrastructure. Cloud administrators can review the operational status of the cloud-based system in place.

A typical cloud monitoring tool in place can definitely help in analyzing the performances of an infrastructure system on a modular level and troubleshoot if needed.

IBM — Observability Tools

Observability is often mixed up with the more generic term “monitoring”. Observability allows you to keep an eye on your infrastructure, your applications, log activities and improve as necessary.

As we look at IBM Cloud as a whole, it is worth to mention the most important tools for observability we host on IBM Cloud. In the next section we’ll go through these tools, their features and we’ll expose a comparison metrics in terms of deployment models of each one (PaaS, IaaS and CaaS).

If we look at IBM Cloud Platform Catalog….

Availability Monitoring

Availability is the capacity of a system (infrastructure system, platform or any existing application architecture) to stay up and running and be ready to accept requests from users spread across the globe.

So if you need to find out if your application (Cloud Foundry runtime in Cloud Platform scenario) is properly up and running, you can use IBM Cloud Availability Monitoring to run simulated performance tests from locations around the world.

It is a tool for detecting, isolating and diagnosing application issues faster and simplify the DevOps team’s process.

You can run several tests such as:

Creating a webpage test: which allows you to set up a metric, a target and an alert for the response retrieved from that test.

Creating a REST API test: unlike the previous test, you’ll test here the response time and availability of your application by using one of the following methods: GET, POST, PUT, and DELETE.

Creating a script test from an existing script: as we talk about web application, in testing phase is common to use Selenium as a Web Browser Automation.

Creating a script test from a GitHub repository.

Cloud Monitoring with Sysdig

With the enormous adoption of cloud-native applications and having most of the companies today espoused the Agile philosophy, we all need a way to monitor these complex environments.

Cloud Monitoring with Sysdig is incredibly helpful when talking about things like operational visibility, performances and health of your applications, services and platforms. It offers administrators, DevOps team and developers full stack telemetry with advanced features to monitor and troubleshoot, define alerts, and design custom dashboards.

As represented in the image above, IBM Cloud Monitoring with Sysdig is deployed as a service instance or resource into one of the specific resource groups you previously created. This is a service instance within IBM Cloud Platform. It offers a graphical interface itself you can interact with by creating your custom dashboard and define alerts you are interested in.

Another component of interest that you can find in the image above is the Sysdig agent, which needs to be installed in one of the sources of your choice. This is mainly used with services like IBM Cloud Kubernetes to work with containerized environments (as represented by example in the figure above). It can also be used to monitor virtual servers. Instructions on how to get and analyse metrics for an Ubuntu host can be found at the following link:

https://cloud.ibm.com/docs/services/Monitoring-with-Sysdig?topic=Sysdig-ubuntu

Log Analysis with LogDNA

As part of our observability tools and in addition to monitoring, we also want to keep track and log what is happening on to my platform. Log Analysis with LogDNA services on IBM Cloud Platform provides hosted log management using LogDNA technology and capabilities. It lets you collect, analyze and manage logs in a central location without having to provision your own logging solution.

Looking at the different deployment models, such as Platform, Infrastructure or Container as a Service, it all consists of installing a LogDNA agent onto the right source to start collecting data.

More specifically on how to deploy a LogDNA agent on IBM Cloud Kubernetes, please look at the following:

It works with a Kubernetes DaemonSet component which is in charge of shipping logs from the source (Kubernetes) to a LogDNA instance (which is running on IBM Cloud Platform in this case). Of course the same copy of the agent is deployed on every node up instantiated and currently running on Kubernetes.

First log in to IBM Cloud using the CLI tool, as follows:

ibmcloud login api https://api.ng.bluemix.net

ibmcloud ks cluster-config CLUSTER-NAME-OR-ID

The it appears a command for you to copy and paste in the terminal and start configuring your environment. It lets you use kubectl to run commands on your IBM Cloud Kubernetes cluster.

export KUBECONFIG=/Users/$USER/.bluemix/plugins/container-service/clusters/logdna-cluster/kube-config-hou02-logdna-cluster.yml

Next we want to store our LogDNA ingestion key in Kubernetes, by running the following command (remember to replace your YOUR-INGESTION-KEY with your actual ingestion key):

kubectl create secret generic logdna-agent-key –from-literal=logdna-agent-key=YOUR-INGESTION-KEY

And finally you can deploy the LogDNA DaemonSet using the following command:

kubectl create -f https://repo.logdna.com/ibm/prod/logdna-agent-ds-us-south.yaml

This way we have deployed LogDNA agent Pods to each node in our cluster.

In order to view your logs, you can access IBM Cloud Platform Dashboard, click on to the LogDNA service already created, and click on View LogDNA to open the LogDNA web UI.

Activity Tracker with LogDNA

Observability is mainly having full control over the infrastructure, prevent things and critical issues from happening without the right alerts. All of that is pretty much achieved with the newest technologies and tools for logging and monitoring, but not only that.

Having control over the platform activities themselves is important and sometimes critical as well. Activity Tracker with LogDNA service helps monitor the activity of your IBM Cloud accounts, like which service has been created, the date of creation and its status. Things that definitely help you investigate deeper for abnormal activity and critical actions, and comply with regulatory audit requirements.

Here’s a quick schema which describes the different interactions that may happen on your IBM Cloud account:

This is pretty much related on those services deployed in PaaS mode at a first eye, but it’s not true. It is also possible to select or even add a specific source to start tracking your activities from.

Let’s say we want to add a host and start tracking activities on IaaS service (Ubuntu / Debian host for example). From the Activity Tracker service dashboard you have the option to add a source.

From there click on Ubuntu logo for example and you’ll get instructions on how to install a LogDNA agent on your particular virtual server.

It depends on what the customer is looking for tracking of course, but this is definitely the way to use it on IaaS.

Here’s also the events you can track:

IAM Events: https://cloud.ibm.com/docs/services/Activity-Tracker-with-LogDNA?topic=logdnaat-at_events_iam

Account Management Events: https://cloud.ibm.com/docs/services/Activity-Tracker-with-LogDNA?topic=logdnaat-at_events_acc_mgt

Service Instance Events: https://cloud.ibm.com/docs/services/Activity-Tracker-with-LogDNA?topic=logdnaat-at_events_rc

If we look at other SaaS services

Bilaterally we have also the possibility to extend the use of our Cloud Platform observability tools to something different. In case of a hybrid or multi-cloud environment we may need to combine monitoring tools with other end-to-end monitoring tools or maybe only interested in understanding what’s going on to our applications.

Let’s briefly describes two solutions you can use on IBM Cloud: APM and New Relic.

IBM APM

IBM Cloud Application Performance Management is IT service management software designed to efficiently monitor, analyze and manage cloud, on-premises and hybrid applications and IT infrastructure. It helps you monitor and analyze application performance, discover issues, identify root causes, and prevent outages to improve user experience and stability.

Some of the key features below:

• Advanced user experience management

• Expert transaction tracking

• Industry-leading diagnostics

• Predictive analytics

• Speedy problem resolution

• Flexible pricing and deployment

New Relic

New Relic is an end-to-end monitoring tools, which allows you to monitor from the front-end to the infrastructure layer of your environment. On-prem, cloud, or hybrid. You can track every change across all your entities with complete clarity and full context.

Products available are:

• APM

• Infrastructure

• Browser

• Insights

• Mobile

• Synthetics

More specifically about Kubernetes only we have …

We have several different utilities or tools we could use to monitor our K8s environment. We’ll mention a few we consider the most common and useful ones.

Kubectl top utility

Easy to use within the Kubernetes service itself. In particular when you scale out your application and you want to understand how it behaves in terms of resources usage, you can run the following command from the terminal/command line:

kubectl top pod

And you will get the usage of your pods in terms of resources utilized (CPU and Memory), as reported in the picture below.

Kubernetes Dashboard

Kubernetes Dashboard is a web-based representation of your Kubernetes Cluster environment, provided as a plug-in within the tool. Here’s an example:

As you can see from the image above, you’ll basically get from the main dashboard the exact same representation of resources usage of your Kubernetes Cluster, as you would get by running “kubectl top” command.

This also allows you to click on each pod and see detailed metrics, usage and logs. And it is generally more user-friendly for a new user of Kubernetes service.

Prometheus

Prometheus is a popular monitor tool used in Kubernetes.

It stores all its data as a time series. This data can be queried via the PromQL query language and visualized with a built-in expression browser. Since Prometheus is not a dashboard, it relies on Grafana for visualizing data.

An example of a Grafana dashboard, considering we can build up different customized dashboards:

The EFK Stack

The EFK stack comprises Fluentd, Elasticsearch and Kibana.

They are a good mix for collecting logs and exposing those to the user via a UI dashboard.

Kibana is the UI; the user can look at the final logs, filter up by specifying parameters of his interest and customize his dashboards via queries.

Conclusions

In this short article we have presented different levels of information we can collect, analyze and visualize from our IBM Cloud platform, depending on the deployment model we adopted, and we saw how useful they are. Not only developers, but fully-integrated DevOps teams can benefit from these services tools to create, run and then keep track of their applicational environment as well as minimize the impact in releasing new pieces of software in production.