Skip to main content

Actions

Introduction

Actions are an integral part of the monitoring ecosystem, where problems and issues are addressed and resolved. Actions can vary widely and come with several considerations:

  • Manual vs. Automated Actions: Determining whether the action should be manually executed by an operator or automatically by the system.

  • Approvals Required: Identify necessary approvals before executing the action.

  • Type of Action: Specifying the nature of the action, such as restarting a service, scaling resources, or sending notifications.

  • Nature of the Impact: Understanding the potential impact of the action on the system and its users.

The Virtana Wisdom supports the full lifecycle management of action configurations, including Create, Read, Update, and Delete (CRUD) operations. Each operation includes specific steps that interact with user interface elements.

Create an Action Configuration

Actions.png
  1. Navigate to Settings > Actions Configuration.

  2. Click on the "Add Action" button. Select the action type from the drop-down menu.

    You can select actions such as Slack, MatterMost, Teams, Https, and WebEx

  3. Enter the "Name" in the Name input field.

  4. Enter the "Webhook URL" in the Webhook URL input field.

  5. To test if the webhook URL is correct, click on Send Message.

  6. Click Add Action to save.

    action_policy.png

Update Action Configuration

  1. Locate an existing action configuration in the list.

  2. Click the "Action Name" in the row go to the edit configuration.

  3. Update the necessary fields (e.g., Name, Webhook URL).

  4. Click the "Save" button.

Delete Action Configuration

  1. Locate an existing action configuration in the list.

  2. Click the "Delete" icon next to the configuration.

  3. In the confirmation dialog, click "OK".

List Action Configurations

  1. Navigate to Configurations List:

    • Click on Settings > Actions menu item

  2. A list of all available action configurations is displayed.

Search Action Configuration by Name

search_action.png
  1. Click on Settings > Actions menu.

  2. Locate the search bar or search input field at the top of the configurations list page.

  3. Enter the name (or part of the name) of the action configuration you want to search for.

  4. Click the "Search" button.

    The list of action configurations remains filtered based on the search query until the search input is cleared or a new search is performed.

Default Action Policy

For each category of alarms (Info, Warning, and Critical), select the appropriate actions to be triggered. These actions can include notifications, alerts, or any predefined responses based on the severity of the alarm. Action configuration supports setting multiple actions, allowing you to configure various action types for both rules and actions settings.

default_action.png

Alarm Rules

To create Alarm rule:

  1. Navigate to Alarms >Rules >Create New Rule.

  2. To set up a new rule, choose the option for multiple action types as the target for notifications

  3. Based on the selections made in the rule configuration screen, the chosen multiple action types will be triggered, and notifications will be sent using the action service.

  4. For existing rules, you can edit and modify the action type selections as needed.

metric_rule.png

Create an HTTP Configuration

Here are the steps to use the newly added HTTP action type

  1. Navigate to Settings > Administration >Action menu.

  2. To create a new action, select Add Action from the drop-down menu and choose the HTTP type.

  3. Provide the Name, HTTP endpoint URL, JSON data payload. (Refer to the sample)

  4. Add the HTTP header key value pair. (Refer to the sample)

Note

Following is the sample JSON and the Header key values to enter.

In a document, we must provide a json sample format as an input. Refer to the following sample json for more details:

{  
	"title": "${title}", 
	"titleLink": "${link}", 
	"ruleId": "${ruleId}",  
	"caseId": "${caseId}",  
	"caseName": "${caseName}",  
	"caseDescription": "${caseDescription}",  
	"openTime": "${openTime}", 
	"entityName": "${entityName}",  
	"entityType": "${entityType}",  
	"ruleName": "${ruleName}", 
	"ruleType": "${ruleType}",  
	"thresholdValues":
	 [  
		<#list thresholdValues as value>   
	 {     
		"gaugeName": "${value.gaugeName}", 
	        "threshold": ${value.threshold?c},     
		"exceededValue": ${value.exceededValue?c}  
	 }	
		<#if value_has_next>, </#if>
 	  	</#list>
	 ], 
	 "sourceUuid": "${sourceUuid}",
	 "severity": "${severity}"

	 }

Description

  • ${title}: Case name

  • ${link}: Applaince Case Url

  • ${ruleId}: Case Rule Id,

  • ${caseId}: Case Id

  • ${caseName}: Case name

  • ${caseDescription}: Case Description

  • ${openTime}: Case Open Time (e.g., 2024-10-25 03:05:00 PDT)

  •  ${entityName}: Entity Name (e.g., qe-appdisc-01.lab.vi.local)

  • ${entityType}: Entity Type (e.g., ESXHost)

  • ${ruleName}: Alarm Rule Name

  • ${ruleType}: Alarm Rule Type

  • ${sourceUuid}: Applaince UUID

  • ${severity}: Case severity (e.g.,info, warning, critical)Threshold Values List (#list thresholdValues as value)

  • ${value.gaugeName}: Gauge Name

  • ${value.threshold}: Threshold

  • ${value.exceededValue}: Exceeded Value

Header key values to enter:

{ "Accept": "application/json"}

Here is the snippet

action.png

ServiceNow event notification via Actions

The ServiceNow event notification can be received via Actions in the Virtana environment. To integrate this, use the following sample JSON data playload:

{
    "records": [
        {
            "source": "Virtana",
            "event_class": "${sourceUuid}",
            "resource": "${entityName}",
            "node": "${sourceUuid}",
            "metric_name": "${caseName}",
            "type": "${entityType}",
            "severity": "1",
            "description": "${caseDescription}",
            "additional_info": "${link}"
        }
    ]
}

Enter the following in the Header key value pair section:

{
"Content-Type": "application/json",
"Authorization": "Basic xxxxx"
}

The above JSON will help you generate the token. Use the following command to push/trigger the notification.

echo $(echo -n 'username@password' | base64)