AIOps

 View Only

WAIOps v3.3 - Part 09 : Create Runbook

By Jeya Gandhi Rajan M posted Fri May 06, 2022 12:26 PM

  

This article explain about how to create Runbook in Watson AIOps.

The runbook creating involves the following steps.

  • Connect Backend System with SSH
  • Create New Action
  • Create Runbook
  • Assign Runbook

The article is based on the the following

  • RedHat OpenShift 4.8 on IBM Cloud (ROKS)
  • Watson AI-Ops 3.3.0

1. Connect Backend System with SSH

We are going to create a Runbook which has some automation scripts.

Being, it is first time, we need to configure Integrations to connect to the target system (it is a system in which the script is going to get executed).

  1. Goto the page Data and tool integrations

  2. Click on Add Connection

  3. Click on Runbooks

  4. In the SSH card click on the Add Connection link

  1. Click on Connect

  1. Copy the ssh value

  1. Login into to the target backend system (jump server)

  2. Run the command

vi ~/.ssh/authorized_keys

  1. Copy the SSH value copied from the UI and save it.

  1. Click on Done

  1. SSH Connection is created

2. Create New Action

  1. Goto Automation > Actions

  2. Click on Create Actions

  1. Enter values for the High lighted fields.

  2. Give your script in the Script text box.

Example:

cd /root/gandhi/waiops330/runbook
02-runbook-creditscore-ilu1wc.sh

This script will get executed when the runbook is started.

  1. The content of the script file could be like this.
#!/bin/bash

echo " iLender CreditScore runbook"

curl http://ilender-creditscore-ilender-ns.aaaaa.cloud/creditscore/clearLeakMemoryUptoMaxPercentage

echo ""
echo "Process completed"

  1. Click on Edit button in the target row.

  2. You can enter here the IP Address of the target system.

  3. Click on Save

  1. Click on Edit button in the user row.

  2. You can enter the user id here to login into target system.

  3. Click on Save

  1. You can see the Action created here.

3. Create RunBook

  1. Goto Automation > Runbook

  2. Click on Create Runbook

  1. Enter Name and Description.

  2. Click on Add automated step.

  1. Select the listed Action, which we created already.

  2. Click on Select this action.

  1. It shows parameter mappings. you can choose Use Default Value

  2. Click on Save.

  1. Click on Publish.

  1. Shows created Runbook.

4. Assign Runbook

  1. Goto Automation > Policies

  2. Click on Create Policy

  1. Click on Create

  1. Give Name and Description.

  2. Give Property, Operator, Matches and Value.

Here Attribute and Value should match the story summary. Then only this runbook will get associated with that story event.

  1. Choose the runbook.

  2. Click on Save.

  1. Runbook is assigned to a policy.


#howto
#setup
#install
#configure
#CloudPakforWatsonAIOps
#cp4aiops
#runbook
#Automation
#Integration
#RBA
0 comments
8 views

Permalink