Skip to main content

Home

Creating AutoActions

  1. On the Unravel UI, click the AutoActions tab.

  2. On the AutoActions page, in the upper-right corner, click new.png.

  3. On the New AutoAction window, select any of the following templates:

    Tip

    Templates are policies that you define to trigger an alert.

  4. On the New AutoAction page, specify the following details:

    Item

    Description

    Policy Name

    Specify a policy name that reflects the purpose of the AutoAction policy.

    Description

    Describe the policy.

    Active

    Select the checkbox to activate the policy after you create a new AutoAction. It is not mandatory to activate a policy during creation.

    Trigger Conditions

    Specify the conditions when an alert should be triggered. The trigger condition types are Users, Queues, Clusters, and Apps. You must define at least one trigger condition type.

    Each trigger condition type has a set of conditions, such as Metric, Operator, Value, and State.

    Note

    Select either AND, OR, or SAME operator for complex trigger conditions.

    For information on the SAME logical operator, see the Same logical operator.

    • Metric

      Select one of the cluster metrics. Refer to Supported cluster metrics.Supported cluster metrics

    • Operator: Use the operator (>=) or (<=) to define the threshold level of the selected metrics compared to the value.

    • Value: Specify the threshold value in numeric. The default value is considered per Metric (logical default) and is changed when you change the metric.

    • State: Select the state from the drop-down list.

    Refine Scope

    Click the down arrow autoaction-field-icon.png and select a scope to trigger the AutoAction policy. Use the scope to limit when an AutoAction trigger is detected. By selecting a scope, you can refine AutoActions based on criteria that must be true to trigger an AutoAction.

    You can refine the scope based on the following fields:

    Field name

    Description

    For the Apps template

    Select the application template to get an alert on any application concerns, such as

    • Resource contention in cluster or queue

    • Rogue User or Rogue Application

    • Long-running workflow and YARN applications

    • Long-running hive query

    • Too many mappers or reducers in a MapReduce job

    Time

    Sets the time range and zone during which the AutoAction can be triggered. The AutoAction remains active but does not trigger outside the specified time range. Select always or daily.

    • Always: Runs the AutoActions at all times.

    • Daily: Sets a scoped time range for an AutoAction to run. The scoped time range helps catch overnight tasks that should be refrained from running.

      Specify the start time, end time, and timezone.

    User

    Select All, Only, or Except.

    • All: All users are considered in the scope.

    • Only: Only the selected user is considered in the scope.

    • Except: All the users (except the selected user) are considered in the scope.

    If you select the Only or Except option, select a user from the list and click Add User to add more users. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Queue

    Select All, Only, or Except.

    • All: All queues are considered in the scope.

    • Only: Only the selected queue is considered in the scope.

    • Except: All the queues (except the selected queue) are considered in the scope.

    If you select the Only or Except option, select a queue from the list and click Add Queue to add more queues. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Cluster

    Select All, Only, or Except.

    • All: All clusters are considered in the scope.

    • Only: Only the selected cluster is considered in the scope.

    • Except: All the clusters (except the selected cluster) are considered in the scope.

    If you select the Only or Except option, select a cluster from the list and click Add Cluster to add more clusters. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Application Name

    Select All, Only, or Except.

    • All: All application names are considered in the scope.

    • Only: Only the selected application name is considered in the scope.

    • Except: All the application names (except the selected application name) are considered in the scope.

    If you select the Only or Except option, select an application name from the list and click Add Application Name to add more applications. You can also specify regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Sustained Violation

    Specifies a time violation must occur before the AutoAction is triggered. The sustained violation time allows the violator to self-correct and decrease the false positives.

    The default is none, which indicates all AutoActions are immediately triggered upon the violation, and the specified action is carried out.

    You can select min or max. In both cases, AutoAction must be continually violated.

    • Min: Suppresses the triggering of violation actions for “on-offs” and metric spikes. If a violation stops before the minimum period, the clock resets for that app. For instance, if the minimum time is one hour and the app violates the AutoAction for 58 minutes and then returns to normal. No action is taken, and the period for that app resets to zero (0).

    • Max: Suppresses the triggering of violations for long-running apps and triggers on AutoAction rule scope on ad hoc short-lived user apps.

    If you select the min or max option, specify the time in seconds. The maximum time limit is 86399 seconds.

    For the Impala template

    Select Impala templates to get an alert on Impala applications for the following scenarios:

    • Impala queries running for longer than a threshold

    • The cost of the Impala application exceeds a threshold

    Cluster

    Select All, Only, or Except.

    • All: All clusters are considered in the scope.

    • Only: Only the selected cluster is considered in the scope.

    • Except: All the clusters (except the selected cluster) are considered in the scope.

    If you select the Only or Except option, select a cluster from the list and click Add Cluster to add more clusters. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    User

    Select All, Only, or Except.

    • All: All users are considered in the scope.

    • Only: Only the selected user is considered in the scope.

    • Except: All the users (except the selected user) are considered in the scope.

    If you select the Only or Except option, select a user from the list and click Add User to add more users. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Queue

    Select All, Only, or Except.

    • All: All queues are considered in the scope.

    • Only: Only the selected queue is considered in the scope.

    • Except: All the queues (except the selected queue) are considered in the scope.

    If you select the Only or Except option, select a queue from the list and click Add Queue to add more queues. You can also enter regular expressions (regex) to specify the scope. Ensure to select a scope and then only define the regex.

    Time

    Sets the time range and zone during which the AutoAction can be triggered. The AutoAction remains active but does not trigger outside the specified time range. Select always or daily.

    • Always: Runs the AutoActions at all times.

    • Daily: Sets a scoped time range for an AutoAction to run. The scoped time range helps catch overnight tasks that should be refrained from running.

      Specify the start time, end time, and timezone.

    Sustained Violation

    Specifies a time violation must occur before the AutoAction is triggered. The sustained violation time allows the violator to self-correct and decrease the false positives.

    The default is none, which indicates all AutoActions are immediately triggered upon the violation, and the specified action is carried out.

    You can select min or max. In both cases, AutoAction must be continually violated.

    • Min: Suppresses the triggering of violation actions for “on-offs” and metric spikes. If a violation stops before the minimum period, the clock resets for that app. For instance, if the minimum time is one hour and the app violates the AutoAction for 58 minutes and then returns to normal. No action is taken, and the period for that app resets to zero (0).

    • Max: Suppresses the triggering of violations for long-running apps and triggers on AutoAction rule scope on ad hoc short-lived user apps.

    If you select the min or max option, specify the time in seconds. The maximum time limit is 86399 seconds.

    Actions

    Click the down arrow autoaction-field-icon.png and select the action to be taken when the conditions defined in the AutoAction policy are met and an AutoAction is triggered. You can choose from any or all of the following actions:

    Warning

    The Move App to Queue and Kill App are mutually exclusive. If you select both, the Kill App takes precedence, and the Move App to Queue is ignored. For these to be executed, the scope must:

    Have directly caused the rule violation, and
    Have allocated resources; that is, the app is in allocated or running states.

    Move App to Queue is a non-destructive action that does not affect the cluster performance and its availability to the user; however, use it cautiously.

    Kill App is a destructive action. It can affect the cluster performance and its availability to the users.

    • Email

      • Enter the email ID of at least one recipient and then click Add Email.

        You can add more recipients.

        Select the Include Owner checkbox to include the app's owner as a recipient of the email. The owner ID of an app can be a username (for example, John) or an email address (for example, john@acme.com).

        Note

        If the owner ID of an app is a username, then you must configure the base DNS for sending an email to the owner.

        You can configure the base DNS using the com.unraveldata.report.user.email.domain property. For configuring email alerts and specifying email properties, see Email alerts.

    • HTTP Post

      • Enter at least one URL and then click Add URL. For example, http://localhost:8000/?notify=xyz@unraveldata.com&amp;amp;notify_owners=false

        Ensure to open the corresponding port.

        You can add more URLs.

    • Post to Slack

      Unravel provides integration with SlackApp, which lets you post information to one more Slack channel and user. Specify the following:

      • Webhook URL: Enter the incoming webhook URL configured in Slack for the channel or user and then click Add Webhook URL.

        You can post to multiple webhooks.

      • Token: Enter the OAuth access token for the SlackApp.

      See Slack's Incoming Webhooks for more information.

    • Move App to Queue: Enter a queue name to move the app to the queue.

    • Kill App: Select the option to kill rogue apps that cause contention of cluster resources.

  5. Click Create.

    An AutoAction is successfully created and listed on the AutoActions page.