Industrial ChatBots: Use Cases in DevOps

Author

Vaibhav Sahu

Principal Data Scientist

Published Mar 11 2019

We see a lot of bots around us, such as Apple’s Siri, Amazon’s Alexa, Google Home, etc. These bots are not only responsive but are also intelligent enough to help us in doing some of the basic activities of our everyday life- playing songs, giving weather updates, set reminders, etc.

However, these bots have different challenges when it comes to industry implementations. Industry use cases require bots that can resolve specific problems in the most efficient ways. In this article, I present various uses of bots in DevOps that can help the teams to save a huge amount of efforts, resources, and time.

Chatbots, or “Conversational Agents”, are hosted applications that can understand human requests. These bots then reply or act based on the requests. It is not necessary for the requests to be specific commands, which makes the bot flexible for a layman to place a request without necessarily having the domain knowledge.

There are generally two types of bot implementations:

  1. Domain-Specific Bots
  2. Generative Bots

Domain-specific bots are trained for a particular domain; they are smart, they can understand human requirements, and can be“stateful” while being“contextual”. They understand the context in the series of commands; they respond to the user to get a specific information related to the command, that may be required to complete the action.

Generative bots, on the other hand, generate answers instead of asking for more information or replying from the set of answers. They take the query word-by-word and generate responses on the fly. They can handle complex and unseen queries and respond accordingly. However, it is complicated to train a generative bot as it requires various deep learning models.

Bot Architecture:

Since the industrial use cases are highly defined, we use Domain Specific Bots. Here are some use cases in DevOps that can ease and expedite the processes by implementing bots.

Log Retrieval:

Generally, when a support team is required to understand the reason for the failure of jobs, they need to fetch the logs from multiple machines that are running different services. To fetch these logs, they need to login or SSH to respective machines and run some Unix/Linux commands. While the task may be easy for an expert, but it is repetitive. In this scenario, soon after you enter the IP and Service Name in your machine, the bot can do all the back-end job for you and fetch you the appropriate log file, just the way it is shown in the chat screen below.

Health Check-Ups:

In a Hadoop cluster environment, where multiple services and daemons are running on multiple machines, it is required to check the health of all the services that are running on a cluster. In this case, instead of running some commands on a terminal, you can command the bot in human language and he will provide the status for you. For example, you can command “Report status of all services running on XYZ cluster”, or “What is the running status of ABC service running on XYZ environment”, etc.

Run Test Cases:

Additionally, the bot can also invoke automated test cases to check their status for success, failure, or need fixing. For example, to check Account management, the bot can test the success of “Account Creation”, “Add Shipping/Billing Address”, “Add Payment information”, and “Add Loyalty points” to the account’s test cases. These cases can be tested multiple times by multiple users in different environments.

To implement the above use cases, it is necessary that the bot is hosted in a machine that has access to a cluster running environment.

Authorization of DevOps Bot:

While the bot’s responses may seem highly intuitive, these responses are completely authorized. There are two ways the users are authorized in a bot environment.

Asking Authorization Code: Here, your bot should ask the user their password (note that the bot can access user id from the screen directly) to get the authorization. The password should be masked to adhere to the password compliances. But if you’re using a third-party chat service provider, you may need to develop your own Chat UI, if it is not provided already.

Handle Authorization at the Back-end: In this case, the authorization is set up in the bot at the back-end. The bot will dynamically check if a certain user is allowed to run the query they are asking. The bot notifies the user accordingly. This looks like an easy and viable option for the third party chat tools.

Benefits of using DevOps bots:

  1. Since it is not a command-based agent, it doesn’t require a set of commands for specific actions. It can understand the requirements in a regular human language.
  2. It saves a lot of time and effort of support teams by doing their repetitive tasks, which also increases the team’s efficiency.
  3. Provides one more layer of authorization.
  4. A suite of multiple use cases can actually make the bot a great tool for the whole support team.

Although Domain specific bots are not a solution for everything, they can surely be a great help in multiple industries, such as banking, healthcare, e-commerce, engineering, etc. A careful implementation will surely improve the processes and help the teams to focus on more attention-demanding tasks while a bot can take care of the routine tasks. At the same time, the use of machine learning, NLP, and smart programming can also enhance the bot’s intelligence.