This article explains about how to create and execute Run Book in Watson AIOps.
The article is based on the the following
- RedHat OpenShift 4.6 on IBM Cloud (ROKS)
- Watson AI-Ops 3.1.0
1. Create RunBook
The creating runbook involves the following steps.
- Connect Backend System with SSH
- Create New Automation
- Create RunBook
- Create Trigger
1.1. Connect Backend System with SSH
In the event manager click on
Automation --> Runbook
Let us create a Runbook which has some automation scripts.
Automation --> New Automation
Being, it is first time, we need to configure Integrations to connect from Event Manager to the target system, from where the script is going to get executed.
You are in Integrations page.
ssh into the target system.
Copy the file name high lighted.
In the target system, vi into the file.
Copy the Key from the UI.
Paste the key in the vi and save it.
You can see the script is connected with the target system.
1.2. Create New Automation
Automation > Runbooks
Automations > New Automation
Enter values for the High lighted fields.
Give your script in the
Script text box.
This script will get executed when the runbook is started.
Edit button in the
You can enter here the
IP Address of the target system.
Edit button in the
You can enter the
user id here to login into target system.
You can see the automation created here.
1.3. Create RunBook
Add automated step.
Select the listed
Automation, which we created already.
Select this automation.
It shows parameter mappings. you can choose
Use Default Value
Shows created Runbook.
1.4. Create Trigger
Triggers > Create New Trigger.
Value should match the event you get in event manager. Then only this runbook will get associated with that event.
Here Attribute is
Summary and the value of that is
Rating Pod down
"Summary":"Rating Pod down",
Choose the runbook.
Select the Runbook.
Runbook is created.
2. Execute RunBook
Whenever an event created in event manager, the event manager flags the event if the event attribute matches to the trigger condition of any of the runbook stored in event manager.
You can see the dot under
Runbook column for the
Rating Pod Down event.
Click on the event record
On the right side, you will have list of actions.
It opens up the Runbook page.
It contains 1 step only.
Step executed and status is successful.
Give feedback about the runbook.
You can see the execution history.
Released by :
Jeya Gandhi Rajan M