Bulk edit of OpsItems in AWS Systems Manager OpsCenter
In a previous post, we discussed using Operational insights in Systems Manager OpsCenter to help you identify duplicate issues and noisy event sources. However, there are still situations where you will have numerous OpsItems that require updating. Instead of manually editing one-by-one, you can use a nifty feature for bulk editing of Opsitems in AWS Systems Manager OpsCenter. This feature lets you change the status, priority, severity, and category of many OpsItems with a single operation. You’ll explore how to bulk edit using the AWS Systems Manager OpsCenter console and an AWS Systems Manager Automation runbook in this post.
To follow the steps in this post, you must have OpsCenter enabled in your AWS Account. You can follow the steps outlined in getting started with OpsCenter. You must also have several OpsItems that you can edit.
Suppose you intend to run the AWS Command Line Interface (AWS CLI) for bulk updates. In that case, you must also make sure that you have installed the required dependencies as outlined in the AWS CLI documentation.
Perform the bulk update in the OpsCenter console
The following diagram illustrates how to apply filtering for finding only OpsItems related to a non-responsive Amazon Relational Database Service (Amazon RDS) instance. The severity[nn1] of these items is set to 3 – Medium. However, it’s been determined that the severity should be 1 – critical. Instead of manually editing the severity of each OpsItem, we’ll use the bulk edit feature.
- Select the OpsItem that you want to update. Do this by selecting the checkbox for each item or the single checkbox in the header row will select all of the filtered OpsItems.
- After selecting the OpsItems that must be changed, choose the Edit tab near the top.
- A bulk edit window will display where you choose the desired Status, Priority, Severity, and Category for the OpsItems, and then choose Save. In this example, we’re changing the Severity from 3 – Medium to 1 – Critical and making sure that the Status is In progress.
- It will take a few minutes for the edit to complete and you can view the changes. In our case, the Severity is updated to 1 – Critical and the Status is consistently In progress.
Perform the bulk update via an Automation runbook in the AWS Console
Open the AWS Systems Manager Automation console and find the AWS-BulkEditOpsItems Automation document to get started. AWS documentation provides more details for working with runbooks, and the documentation for AWS-BulkEditOpsItems describes this specific runbook.
You may need to adjust your region, as it will default to the Oregon (us-west-2) Region.
Accept the default setting for Simple execution, and scroll to the section Input parameters. Here you can update the Status, Category, Severity, and Priority that you want to apply to the listed OpsItemIds.
In this example, we’re changing the Severity to 1 – Critical and Status to InProgress. After your inputs have applied, choose the Execute button at the bottom of the page.
Suppose you want to confirm that the Runbook ran successfully. In that case, you can go to AWS Systems Manager OpsCenter console, select the OpsItems tab, and ensure that the OpsItems have updated.
Running bulk updates via AWS CLI
You can also use AWS CLI to execute the same bulk update. If you scroll down to the bottom of the runbook. There is a section called AWS CLI command and shareable execution link.
Expand the Execution platform dropdown box, and you can select the appropriate option for your operating system. Note that the AWS CLI details will include the parameters you have populated for the runbook.
If you select the Linux / Unix / OS X terminal, the command will look something like this:
For Windows, the command will look something like this:
Regardless of your OS, the AWS CLI will return an Automation execution ID. You can check the status of the task by using the following command:
In this post, you learned how to bulk-update many OpsItems by using the OpsCenter console, the Automation document console, and the AWS CLI. For more information regarding Systems Manager Automation runbooks, see the Automation runbook reference in the AWS Systems Manager User Guide.