One of the core practices of DevOps is continuous integration (CI) and continuous deployment (CD). CI/CD, in today’s context, refers to the ongoing process of committing new code to a central repository, testing that code to make sure it doesn’t break, and deploying that code into production. In theory, this allows businesses to quickly develop and deploy new features and bug fixes, without interrupting service.

However, this process is only one side of a successful deployment. Before you make a push to production, how do you guarantee that the systems supporting the application are healthy?

In reality, change still accounts for a majority of IT incidents. Whether there is an issue with the host itself or with an interconnected component, DevOps and Ops lack the visibility needed to ensure successful deployments.

In this post, I’ll share how Moogsoft can be leveraged through CI/CD tools, like Jenkins, so that DevOps can guarantee the health of their infrastructure before deploying new code.

Monitoring for CI/CD

Today, most app servers are clustered, meaning that the health of an individual server doesn’t necessarily guarantee the success of a deployment. As an example, you might push a code release to one server, which in turn generates new application exceptions. This generally means that something is broken. You can effectively minimize the impact by understanding what those application errors are before you roll out a new code release across all of your app servers.

So how can DevOps teams get proactive insight into their production environments?

DevOps teams today typically leverage comprehensive suites of monitoring tools to detect incidents. These tools may include AppDynamics, New Relic, CloudWatch, Nagios, Zabbix, Splunk, and Solarwinds, among many others. These tools do an excellent job of providing visibility across each piece of your production stack. However, in a large environment, they can also create massive event volumes, making it challenging for DevOps and Ops teams to detect incidents. Furthermore, it’s difficult to identify relationships between events. This blindness means that developers today push their code without truly knowing the health of their environment.

Fortunately, Moogsoft AIOps can do this all for you.

Moogsoft AIOps is a solution that ingests event feeds across entire enterprise monitoring ecosystems and applies algorithms to provide real-time insight. Moogsoft AIOps massively reduces noise (up to 99%) and correlates events across toolsets. The output is Situations — clusters of correlated alerts across toolsets that pinpoint unusual activity.

Moogsoft Situations are now being adopted by DevOps teams to streamline CI/CD. DevOps teams might be wondering, “Does this host have any alerts associated with it? And are those alerts part of active Situations?”

API-Driven Insight for DevOps

Through Moogsoft’s Graze API, DevOps can make a REST call to return alerts or Situations related to any elements of their production stack — whether it’s individual hosts, applications, or entire business services. This ability means real-time insight into the health of your environment before deploying code. Moogsoft AIOps can even automatically distinguish between alerts that were fired before and after a change was made.

The Graze API call would look this this:

https:///graze/v1/getAlertIds?auth_token=&query={“left”:{“op”:1,”column”:”state”,”type”:”LEAF”,”value”:9},”oper”:”OR”,”right”:{“op”:1,”column”:”state”,”type”:”LEAF”,”value”:8},”type”:”BRANCH”},”oper”:”AND”,”right”:{“op”:0,”column”:”source”,”type”:”LEAF”,”value”:””},”type”:”BRANCH”}&limit=20

You then pass to a query:

source IN [‘host1′,’host2′,’host3’]

…or…

application matches ‘My App’

…or…

service matches ‘My Service’

Which should return something like this, for example:

{
“total_alerts”:10,
“alert_ids”:[4, 5, 6, 12, 14, 15, 16, 17, 18, 19, 20, 24]
}

In this example, alerts 6 and 15 are emphasized to indicate that they are new. Let’s say that this app server throws 10 alerts/minute on average. Moogsoft AIOps can capture all related alerts and even distinguish between standard alerts and new alerts that were introduced after the change.

Moogsoft AIOps & Jenkins for CI/CD

Jenkins is one of the most popular tools that  manages CI/CD today. It enables developers to push code to appropriate systems. The Graze API can be accessed from any CI/CD tool that can make API calls, although DevOps teams using Moogsoft typically call Situations through Jenkins.

Validating Production Deployments with Moogsoft AIOps and Jenkins

Let’s say that a DevOps team has tested some new code and they now want to push it to 100 different systems. With a simple REST call through Jenkins, Moogsoft AIOps will return all critical alerts or all active Situations related to those 100 hosts. In this example, let’s say that Moogsoft AIOps comes back with a Situation containing critical alerts related to one of the hosts (CPU high, Disk Full, etc.). Your team might say, 99/100 of the hosts are healthy but let’s wait until 100/100 are ready to go.

These checks and actions can be manually or automatically executed depending on the workflow of your engineering team.

Deploy Code with Confidence

The building, testing and deploying of new features in an agile organization is a challenging process that keeps DevOps teams on their toes. Adding the unpredictability and instability of modern IT infrastructures leaves CI/CD efforts vulnerable to failure. DevOps teams are leveraging Moogsoft AIOps as a major checkpoint in their CI/CD process, to reduce incidents that result from change.


Get started today with a free trial of Moogsoft AIOps — a next generation approach to IT Operations and Event Management. Driven by real-time data science, Moogsoft AIOps helps IT Operations and Development teams detect anomalies across your production stack of applications, infrastructure and monitoring tools all under a single pane of glass.