Adding a custom Optimizer rule

Use the Rules page in the Administration tab to create, configure, and manage Optimizer rules to generate alerts and recommendations. For information about Optimizer rules, see Configuring and managing Optimizer rules.

You can create an Optimizer rule based on a predefined template or create a custom rule. This topic explains the procedure to add a custom rule.

Review the existing templates before you create a new custom rule. For details about creating a template-based rule, see Adding a template-based Optimizer rule.

To add a custom rule 

  1. Click Administration > OPTIMIZER > Rules
  2. In the Optimizer Rules page, click Add new rule.
  3. In the New Optimizer rule page, enter values and make appropriate selections for the following properties:

    Properties marked with (tick) are available only while building a rule in Advanced mode. To switch (toggle) to Advanced mode, click Advanced.

    PropertyDescription
    General
    Name and DescriptionSpecify a name and optional description for the rule.
    Generation schedule

    Select an Optimizer task that defines the schedule of the Optimizer rule. All the configured Optimizer rules are available for selection. For example: Optimizer - daily, Optimizer - weekly.

    Rule type

    Select based on custom conditions.

    By default, Condition 1, is displayed in the Conditions section, Also, a new collapsed tab, called Condition 1, is displayed after the Filters tab.

    (tick) Input data 

    Select whether you want the input data to be based on historical data or a specific data mart. By default, historical data is selected. 

    If you select based on data marts, a new collapsed tab, called Data marts is displayed. 

    Conditions

    Add and apply conditions based on your requirement. A condition, Condition 1, is added by default. You need to configure details of the conditions in their respective collapsed tabs.

    For more information, see the Condition n section in this table.

    Conditions operator

    Select the operator to be used for evaluating the rules with multiple conditions:

    • OR: An alert or recommendation is generated when one of the conditions is true.
    • AND: An alert or recommendation is generated if all the conditions are true. 

    By default, OR operator is used for evaluating the rules.

    (tick) Data marts (applicable only if Input data is set to based on data marts

    (tick) Data mart Select a data mart from the Data mart list. Only data marts that display systems or business drivers are supported. 
    (tick) Entity id column 

    By default, the system identifier that is used in the data mart is selected.

    If the selected data mart does not contain a system identifier, select the metric (column) name from the list.

    The metric names listed here are the column names that are displayed in the data mart.

    (tick) Subresource name column

    Select the column that is identified as the subresource identifier (example: name) column in the data mart. If you do not want the rule to use the subresource columns, select No subresource column.

    (tick) Condition n (applicable only if Input data is set to based on data marts
    Severity

    Select the level of severity to be associated with the alert and recommendation when the specified condition is met.

    • Warning
    • Critical
    • Efficiency (low)
    • Efficiency (medium)
    • Efficiency (high)
    (tick) Column name Select the data mart column name from the list. The rule will be evaluated based on this column. 
    (tick) Value is a metric?

    Select the name of the metric to be displayed in the alert logs.

    • yes (column name is metric name): The name of the metric is displayed in the alert logs along with it's unit.
      For example, if the column name is CPU_UTIL, the name of the metric in the alert logs will be displayed as CPU Utilization %. The unit is displayed in the Value and Threshold columns on the Alert details page. 
    • yes (specified): The name of the metric entered in the Metric field is displayed in the alert logs. If the metric name entered in the Metric field is a metric available in BMC Helix Continuous Optimization,
      then the corresponding unit is displayed in the alert logs. If not, only the custom metric name is displayed in the alert logs.
      For example:
      • If the metric name is MEM_FREE, the name of the metric in the alert logs will be displayed as FREE Memory and the corresponding unit (Bytes) will be displayed.
        The unit is displayed in the Value and Threshold columns on the Alert details page. 
      • If the metric name is Hello World, the name of the metric in the alert logs will be displayed as Hello World. No unit is displayed in the Value and Threshold columns on the Alert details page. 
    • no: Only the name of the metric is displayed in the alert logs. No unit is displayed in the Value and Threshold columns on the Alert details page. 
    (tick) Comparator The comparative relationship on which to base the condition:
    • greater
    • greater or equal
    • less or equal
    • less
    (tick) Compare with 

    Column: Evaluate the rule by comparing the Column name with the column defined in Threshold column.

    Threshold: Choose the type of threshold on which to base the condition:

    • Optimizer threshold
    • custom: In the Threshold field, type a numeric value.

    For information about how to define optimizer thresholds, see Configuring and managing thresholds for metrics and indicators.

    Condition descriptionAn auto-generated description briefly describing the current condition.
    Filters
    Period type and Condition period

    Specify the period for which the condition applies. Select one of the following values:

    • Use time filter: Select a period from the predefined list.
    • Manually specified: If none of the predefined periods meets your requirements, specify the period manually. You can select the resolution (hours, days, weeks, or months) and specify the number. You can also select whether you want to include the current hour/day/week/month in the period based on the resolution. Click Apply after selecting the check box.

    Entity selection method

    Select the method to choose the entities to which the rule applies. You can select specific entities, those based on a filter, or entities in one or many domains and subdomains.

    Select one of the following methods:

    • Entity filter: Select a filter from the Select entity filter list as defined in the Workspace. For more information, see Managing entity filters.
    • All entities
    • All entities of a domain: Select one or more domains from the Domain list.
    • All entities of a domain and its subdomains: Select a domain or subdomain.
    • Specified entities: Select specific systems or business drivers from the Specified systems or business drivers list.

    Entity type selection

    Select the entity types that you want to include in the rule definition and click Apply.

    Select one of the following entity types:

    • All entity types
    • System types: Select specific system types that you want to include in the rule definition. 
    • Business driver types: Select specific business drive types that you want to include in the rule definition. 
    (tick) Exclude systems or business driversSelect specific systems or business drivers that you want to exclude from the rule evaluation.

    Condition n

    Severity

    Select the level of severity to be associated with the alert and recommendation when the specified condition is met.

    • Warning
    • Critical
    • Efficiency (low)
    • Efficiency (medium)
    • Efficiency (high)
    Condition type

    Select the type of condition on which you want the recommendation or alert to be triggered:

    • Good/Warn/Poor Samples Count: Enables you to evaluate the percentage of GOOD, WARNING, and POOR samples of a metric (resource) over a specified time range.
      You can define the good, warning, and poor thresholds from the Add
      Thresholds page. For details, see Configuring and managing thresholds for metrics and indicators.
      A sample, for example, CPU_UTIL sample is considered GOOD if it is less than good threshold, WARN if value is between good threshold and warn threshold, and POOR if value is greater than the warn threshold.
    • Data vs. Threshold: Enables you to set specific thresholds for each metric of your system or business driver and its subobjects, using standard BMC Helix Continuous Optimization
      statistics (average, min, max, sum, percentile) and resolutions (summary, hour, and detail).
      For example, you can configure a rule that generates an alert if the average value of samples at resolution
      summary in the period 05-07 2021 [May-July 21] is greater than 70.

    • Formula: Enables you to enter a custom formula to generate recommendations.

    • Data vs. Baseline: Enables you to compare a metric of your system with a baseline (for example, MONTHLY_BASELINE (ESTIMATED)).
      For example, you can configure a rule that generates an alert if the average value of samples at resolution 
      hour in the period Last complete day is less than or equal to 0.1% compared to the MONTHLY_BASELINE.

    Metrics and (tick) Namespace

    (Not displayed for the Formula condition type)

    Select a performance metric over which you want alerts or recommendations to be generated with the specified severity.

    For some of the technologies, metrics from hypervisors and operating systems can be imported into BMC Helix Continuous Optimization and are differentiated by using namespace.
    Select one of the following namespaces to be used for each metric. 

    • Automatic:  If you do not select any of the namespaces for a metric, BMC Helix Continuous Optimization automatically selects the appropriate namespace for each metric. This is a default option.
    • opt:meas: Used for the metrics that are collected from the hypervisors. For example, metrics collected by the VMware ETL.
    • opt:meas:vn: Used for the metrics that are collected from the operating systems. For example, metrics collected by the Continuous Optimization Agents.
    • opt:der: Used for the derived metrics.


    Condition type as Good/Warn/Poor Samples Count

    Aggregation function

    The type of aggregation to use on the data samples:

    • good
    • warning
    • poor

    Define the good, warning, and poor thresholds from the Add Thresholds page. For details, see Configuring and managing thresholds for metrics and indicators.
    A sample, for example, CPU_UTIL sample is considered GOOD if it is less than good threshold, WARN if value is between good threshold and warn threshold, and POOR if value is greater than the warn threshold.

    For example, if Poor Is selected, the rule will be evaluated if the percentage of poor samples (over the defined time) exceeds the defined threshold.

    ComparatorThe comparative relationship on which to base the condition:
    • greater
    • greater or equal
    • less or equal
    • less
    ThresholdThe threshold value on which to base the condition.
    Condition descriptionAn auto-generated description briefly describing the current condition. For example: Generate alert if the percentage of good samples in the period Last 7 days is greater than 25%

    Screenshot when Good/Warn/Poor Samples Count is selected 

    Condition type as Data vs. Threshold

    Resolution

    The sample resolution on which to base the condition:

    • A single point for the entire period (summary): The sample resolution on which to base the condition. The rule aggregates samples according to the selected statistic
      (for example, average, max) of the entire time filter (for example, 5 days) to a single value. This single value is compared (for example, greater, less) to the threshold while evaluating the rule.
      For example, if Condition period = 5 days, Aggregation function = average, and Comparator = greater, then:
      • The rule aggregates all the samples collected over last 5 days
      • Calculates the average of all the samples, and
      • Compares this single value to the threshold

              If the value is greater than the threshold, an alert will be generated.  

    • A point for each hour of the day (day profile): The sample resolution on which to base the condition. The rule aggregates samples of each hour of the day according to the selected statistic
      (for example, average, max) of the entire time filter to a single value. Therefore, there are 24 samples (each for an hour) to be evaluated.
      This single value is compared (for example, greater, less) to the threshold while evaluating the rule.
      For example: if Condition period = 3 days, Aggregation function = max, and Comparator = less, then:
      • The rule collects the samples reported for each hour of the day (12:00, 1:00, 2:00, and so on)

        Timestamp2nd May3rd May4th May 
        12:0032.54
        01:00 55.43.7   
        02:003.84.32.9
        03:002.81.72.6
      • Aggregates the values collected for each hour according to the selected statistic (max) to a single value:

        Timestamp2nd May3rd May4th May  Aggregated value of CPU Utilization
        12:0032.544
        01:00 55.43.7   5.4
        02:003.84.32.94.3
        03:002.81.72.62.8
      • Compares this single value to the threshold

        If the value is less than the threshold, an alert will be generated.

    • Samples at the most granular resolution (detail): With the selected resolution, the condition will be evaluated over the samples collected in the last 3 days.
      Any period defined in the rule will be ignored.
      The rule evaluates each sample of the entire time filter and compares (for example, greater, less) the value to the threshold.
      The number of samples received may vary according to the granularity defined in the detail resolution (for example, 15 minutes) in the ETL configuration. 
    Aggregation function

    The type of aggregation to use on the data samples. 

    A single point for the entire period (summary):

      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each day.
      • min - Always uses the lowest sample over the time filter.
      • minimum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on
        minimum value of the samples that were collected for each day.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile
    • A point for each hour of the day (day profile):
      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each hour.
      • min - Always uses the lowest sample over the time filter.
      • minimum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on minimum value of the samples that were collected for each hour.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile
    • Samples at the most granular resolution (detail): None
    ComparatorThe comparative relationship on which to base the condition:
    • greater
    • greater or equal
    • less or equal
    • less
    • different more
    Threshold type

    The type of threshold on which to base the condition:

    • Optimizer threshold
    • custom: In the Threshold field, type a numeric value.

    For information about how to define optimizer thresholds, see Configuring and managing thresholds for metrics and indicators.

    Thresholds for subresources

    Same threshold for each subresource: Uses the same threshold for each subresource.

    Custom threshold for some subresources: Use different thresholds for the subresources that you add in the Subresources pattern field. 

    • Subresources pattern: Type the name of the subresources. You can also use wildcard character (*) for the subresources that start with, contains or end with the entered keyword.
      For example:
      • sdd*
      • /opt/storage/sd*
    • Subresources threshold: Type a threshold value for each subresource pattern.

    You can add multiple patterns and thresholds using this option.

    Condition descriptionDisplays an auto-generated description that describes the current condition.

    Screenshot when Data vs. Threshold is selected 

    Condition type as Formula

    Formula options

    Select one or more options:

    • Based on metrics: In the Metrics section, click Edit and select the metrics. Click Apply to add the metrics to the rule.
    • Based on indicators: In the Indicators section, click Edit and select the indicators. Click Apply to add the indicators to the rule.
    Parameters and Formula

    In the Parameters section, define parameters to add new thresholds that can be used in the Formula section for the current condition. 

    Type the parameter as per the following syntax:

    <name of parameter> | <description> | <threshold value> | <type>
    Where <type> can be a number or a string.

    You can define multiple parameters by separating them with a newline character (press Enter).

    In the Formula section, enter a formula for the rule by using the Apache Velocity template. For information on the Apache Velocity template,  Apache Velocity template Open link .

    Namespace is used to differentiate the metrics imported from hypervisors and operating systems into BMC Helix Continuous Optimization.
    When using a metric, you can add namespace for each metric within a formula as per the following syntax: METRIC_NAME.namespace("<namespace>"). Use one of the following namespaces:

    • opt:meas: Used for the metrics that are collected from the hypervisors. For example, metrics collected by the VMware ETL.
    • opt:meas:vn: Used for the metrics that are collected from the operating systems. For example, metrics collected by the Continuous Optimization Agents.
    • opt:der: Used for the derived metrics.

    If you do not specify any of the namespaces for a metric, BMC Helix Continuous Optimization automatically selects the appropriate namespace for each metric.

    Note: Use only the snake_case naming convention for the values entered in the Parameters and Formula sections. In this naming convention, each space between words needs to be replaced by an underscore (_) character. 

    For examples about parameters and formulas, see Examples of formulas and parameters.

    Condition descriptionA description in the form of a formula for this rule.

    Screenshot when Formula is selected

    Condition type as Data vs. Baseline

    Resolution

    The sample resolution on which to base the condition:

    • A single point for the entire period (summary): The sample resolution on which to base the condition. The rule aggregates samples according to the selected statistic
      (for example, average, max) of the entire time filter (for example, 5 days) to a single value. This single value is compared (for example, greater, less) to the baseline while evaluating the rule.
      For example, if Condition period = 5 days, Aggregation function = average, and Comparator = greater, then:
      • The rule aggregates all the samples collected over last 5 days
      • Calculates the average of all the samples, and
      • Compares this single value to the baseline

              If the value is greater than the baseline, an alert will be generated.  

    • A point for each hour of the day (day profile): The sample resolution on which to base the condition. The rule aggregates samples of each hour of the day according to the selected statistic
      (for example, average, max) of the entire time filter to a single value. Therefore, there are 24 samples (each for an hour) to be evaluated.
      This single value is compared (for example, greater, less) to the baseline while evaluating the rule.
      For example: if Condition period = 3 days, Aggregation function = max, and Comparator = less, then:
      • The rule collects the samples reported for each hour of the day (12:00, 1:00, 2:00, and so on)

        Timestamp2nd May3rd May4th May 
        12:0032.54
        01:00 55.43.7   
        02:003.84.32.9
        03:002.81.72.6
      • Aggregates the values collected for each hour according to the selected statistic (max) to a single value:

        Timestamp2nd May3rd May4th May  Aggregated value of CPU Utilization
        12:0032.544
        01:00 55.43.7   5.4
        02:003.84.32.94.3
        03:002.81.72.62.8
      • Compares this single value to the threshold

        If the value is less than the threshold, an alert will be generated.
    Aggregation function

    The type of aggregation to use on the data samples. 

    A single point for the entire period (summary):

      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each day.
      • min - Always uses the lowest sample over the time filter.
      • minimum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on
        minimum value of the samples that were collected for each day.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile
    • A point for each hour of the day (day profile):
      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each hour.
      • min - Always uses the lowest sample over the time filter.
      • minimum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on minimum value of the samples that were collected for each hour.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile
    Comparator

    The comparative relationship on which to base the condition:

    • greater
    • greater or equal
    • less or equal
    • less
    • different more
    Scaling factor 

    Enter the number to use for scaling the baseline according to the comparator.  

    For example, if the comparator = greater: 

    • If scaling factor = 1, an alert will be generated if the value is greater than the baseline
    • If scaling factor = 1.2 and baseline = 50%, then an alert will be generated if the value is greater than 120% of 50%, that is, 60%
    • If scaling factor = 0.5 and baseline = 60%, then an alert will be generated if the value is greater than 50% of 60%, that is, 30%

    Tolerance 

    (applicable only if Comparator is set to different more

    Enter the number to use for tolerance of the baseline when the comparator is set to different more. 

    The formula to calculate the lower and upper limits is: [data point] < [baseline] × (1 - [Tolerance]) OR [data point] > [baseline] × (1 + [Tolerance])

    If tolerance = 0.25 and the baseline = 4.5, then according to the formula, lower limit (4.5×(1-0.25)) will be set to 3.375 and upper limit (4.5×(1+0.25)) will be set to 5.625

    An alert will be generated if the value is outside the range. For example, an entity with value 6 will be alerted and an entity with value 4 will not be alerted.

    Baseline (applicable only if Condition type is set to Data vs. Baseline

    Baseline

    Specify a baseline that can be used to compare with historical data. An alert is generated when a metric of the entity has different behavior with respect to the baseline when compared against the historical data. 

    • Select baseline: Select a baseline from the predefined list. For details, Managing baselines.

      Example scenario

      You want to be alerted when the memory utilization data of the last complete day is greater when compared against the max of the values in the same day of the week of the last 30 days. 

      To achieve this, perform the following steps:

      1. Create a baseline with the following properties:
        Name = Max of last 30 days - same weekday, 
        Input time period = 30 days, Aggregation = max, and Consider data for = Same day of the week. For details, Managing baselines.
      2. Create a custom optimizer rule based on the Data vs Baseline condition for the Memory Utilization metric with the following properties:
        Time filter = Last complete day, Resolution = A single point for the entire period (summary), Aggregation function = average, Comparator = greater, Select baseline = Max of last 30 days - same weekday
      3. Save the rule. If the current memory utilization value is greater than the baseline data, an alert will be generated.
    • Manually specified: If none of the predefined baselines meets your requirements, specify the baseline manually.

    Aggregation function

    (applicable when baseline is set to Manually specified

    The type of aggregation to use on the baselines data. 

    A single point for the entire period (summary):

      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each day.
      • min - Always uses the lowest sample over the time filter.
      • minimum of daily samples - If more than one sample is received in a day, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on
        minimum value of the samples that were collected for each day.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile
    • A point for each hour of the day (day profile):
      • average
      • max - Always uses the highest sample over the time filter.
      • maximum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on maximum value of the samples that were collected for each hour.
      • min - Always uses the lowest sample over the time filter.
      • minimum of hourly samples - If more than one sample is received in an hour, the rule aggregates the multiple samples based on average statistic.
        This single average value is then aggregated based on minimum value of the samples that were collected for each hour.
      • sum
      • 5th percentile
      • 10th percentile
      • 25th percentile
      • 50th percentile
      • 75th percentile
      • 90th percentile
      • 95th percentile
      • 99th percentile

    Period type and Condition period

    (applicable when baseline is set to Manually specified

    Specify the period for which the condition applies. Select one of the following values:

    • Manually specified: If none of the predefined periods meets your requirements, specify the period manually. You can select the resolution (hours, days, weeks, or months) and specify the number.
      You can also select whether you want to include the current hour/day/week/month in the period based on the resolution. Click Apply after selecting the check box.

    • Use time filter: Select a period from the predefined list.

    Consider data for 

    (applicable when baseline is set to Manually specified

    Select the data to be considered to compare a day profile baseline data over the selected condition period. 

    • Entire period: Entire condition period is considered, hence no baseline data.
    • Same day of the week: A data of the previous day of the rule run is considered as a baseline and is compared against the same day of the week over the condition period.
      For example, data for all Tuesdays in 60 days of condition period. 
    • Same day of the month: A data of the previous day of the rule run is considered as a baseline and is compared against the same day of the month over the condition period.
      For example, data for last Friday in a month in 60 days of condition period. 

    For example, if the rule is running on 19th Oct (Wednesday) with the following properties: Resolution = A single point for the entire period (summary), 
    Aggregation function = average, Comparator = greater, Condition period = 60 days, and Consider data for = Same day of the week, then the rule:

    • Considers the data collected for the previous day (Tuesday) as a baseline data.
    • Aggregates the data samples collected for all remaining Tuesdays over last 60 days and calculates the average of all the samples
    • Compares this single value to the baseline data

    If the value is greater than the baseline data, an alert will be generated.

    When a data point is missing

    Select the action to be taken when data points are missing.

    • Do nothing: Do nothing if the data points are missing. 
    • Alert: Trigger an alert if the data points are missing. 

    Screenshot when Data vs. Baseline is selected 

    Condition type > Common to all condition types 
    (tick) Condition description message

    Select one of the following options:

    • Automatic: Use the auto-generated description for the rule.
    • Manual: Add velocity template-based custom description messages for alert emails and log tables.
    (tick) Custom description for alert email (Velocity)

    Available when you select the Manual option for Condition description message. Add a custom description for alert emails and the log table by using the Apache Velocity syntax
    to populate the following variables:

    • point: Data point in which the alert condition is triggered.
    • dataFetcher: Extracts a configuration metric, given the key and metric name.
    • key: Identifies the system/business driver ID.
    • numberFormatter: A utility class to format numbers with measure units. For more information, see
    (tick) Custom description for log table (Velocity)
    Recommendation type

    Select one of the following recommendation types:

    • No recommendation: Do not generate any recommendation.
    • Cluster over-subscription: Generate recommendations when a cluster is oversubscribed.
    • Cluster under-subscription: Generate recommendations when a cluster is under-subscribed.
    • Data Ingestion: Generate recommendations when data is ingested.
    • Forecasted saturation: Generate recommendations when there are capacity issues related to forecasted saturation. 
    • Forecasted saturation for Containers: Generate recommendations when there are capacity issues related to forecasted saturation for containers.
    • Forecasted saturation for Kubernetes Infrastructures: Generate recommendations when there are capacity issues related to forecasted saturation for Kubernetes infrastructures.
    • Generic: Generate a general recommendation.
    • Idle Database: Generate recommendations when idle databases are identified.
    • Idle VM: Generate recommendations when idle VMs are identified.
    • Kubernetes Overallocated Containers: Generate recommendations when overallocated containers are identified.
    • Old snapshots: Generate recommendations when old and outdated snapshots are identified.
    • Overallocated VM: Generate recommendations when overallocated VMs are identified.
    • Power On/Off: Generate recommendations when power on/off VMs are identified.
    • Reserved Instances: Generate recommendations about the number of AWS reserved instances to be purchased.
    • Unattached Volumes: Generate recommendations when unattached volumes are identified.

    The events generated for Forecasted saturation, Forecasted saturation for Containers, and Forecasted saturation for Kubernetes Infrastructures recommendations
    can be viewed as events in BMC Helix Operations Management.

    You can view these events in BMC Helix Operations Management by selecting the Create Events for Future saturation option in the Actions section.
    This option is available only for future saturation events. 

    Recommendation text
    (Not displayed when Recommendation type is No recommendation)

    Add recommendation text for each recommendation type by using the Apache Velocity template to populate the following variables:

    • point/alertpoint: Data point in which the alert condition is triggered.
    • dataFetcher: Extracts a configuration metric, given the key and metric name.
    • key: Identifies the system/business driver ID and can be used to provide additional details about the alerted entity. 
    • numberFormatter: A utility class to format numbers with measure units.

    For syntax and examples on using these variables, see Using Velocity Templates in Recommendation rules.

    Actions 

    Actions to perform

    Specify the action to be taken when the rule generates an alert or a recommendation. Select one or all of the following actions:

    • Send an alert mail: The alert email is sent to the specified recipient.  
    • Change the status of alerted systems/business drivers and domains based on Risk conditions: The status of the alerted entity changes (colored) based on the rule severity.
      If this option is not selected, the rule results are not reported on the Alert log page and the status of the alerted entities is not changed.
    • Create Events for Future Saturation: This option is available only for Forecasted saturation, Forecasted saturation for Containers, and
      Forecasted saturation for Kubernetes Infrastructures recommendations
      . Events based on the rule definition are triggered and sent to BMC Helix Operations Management. 

    Mail recipients

    (applicable when Send an alert mail is selected) 

    Select how you want to include the email addresses for recipients of alert notifications, when the Optimizer rule conditions are satisfied. You can enter the email addresses manually or let the rule automatically retrieve the recipient email addresses that are specified for the alerted entities in a data mart column or in a configuration metric. 

    • Manually specified: Enter the email addresses manually, separated by a semicolon (;) in the Send an email to field.


    • Read from metric: To read the email addresses of owners of the alerted entities from a metric, select the required metric from the Mail recipient metric list.
      • This list displays string configuration metrics and custom metrics available in your environment. For details on these metrics, see Adding and editing string configuration metrics and Viewing datasets and metrics by dataset and ETL module.
      • Make sure that the selected metric includes owner's email address as value and is associated with the entity being alerted.
      • If the selected metric is not associated with that entity, the association with the parent domain is checked and email is sent to the owner of the parent entity.
      • In case of multiple entities and ownerships, the rule will split the entities based on the ownership and send alert emails to respective owners with details about their entities.
        Consider the example of 10 VMware systems of HR Manager, out of which 5 belong to HR1 and other 5 to HR2. When the specified condition is met, these systems are alerted based on the following criteria:
        • When you select a metric associated with systems, for example, the OWNER metric, two separate emails are sent to HR1 and HR2 with details of respective alerted systems. 
        • When you select a metric that is not associated with systems, for example, the APP_OWNER metric, a parent domain is checked and a single email is sent to HR Manager with details of all 10 alerted systems.


    • (Displayed when Input data is set to based on data marts) Read from data mart column: To read the email addresses of owners of the alerted entities from a data mart column, select the required column from the Mail recipient data mart column list.
      • This list displays the columns of the data mart selected in the Data mart field. 
      • Make sure that the selected column includes the email address of the owner of the entity being alerted.

    Admin copy (applicable when Send an alert mail is selected) 

    Select Send to all Continuous Optimization Admins to send a copy of the email to the product administrators. You can configure the administrator email in Global configuration.

    Mail attachment (applicable when Send an alert mail is selected)  

    To attach a specific report with the email that is sent out, select Attach a report and choose a report from the list. By default, Nothing is selected.
    You can define a report that can help to determine the cause of the alert or recommendation. This report can be attached to the alert email.

  4. Click Save.

The rule is saved and enabled by default. The rule is listed in the Optimizer rules table. The rule is triggered to run based on the Optimizer task that is associated with the rule.

Examples of formulas

The following table contains some examples of formulas that you can add to the Formula field. You can use the format as Apache Velocity template. For information on the Apache Velocity template,  Apache Velocity template Open link .

GoalExample of formula
Generate an alert on overprovisioned datastores based on metric values (DSTORE_PROVISIONED is greater than DSTORE_SIZE)

alerted = (DSTORE_PROVISIONED.value > DSTORE_SIZE.value);

Know if data for an indicator/metric (IND_DAYS_TO_SATURATION) is availableif (IND_DAYS_TO_SATURATION) { ... }
Get an indicator (IND_DAYS_TO_SATURATION) valueIND_DAYS_TO_SATURATION.value
Get a specific subresource value, for example CPUIND_DAYS_TO_SATURATION.subresource("CPU").value;
Know if data for a certain subresource is available, for example CPUif (IND_DAYS_TO_SATURATION.hasSubresource("CPU")) { ... }
Set a value or threshold in the outputpoint.value0 = some_value; point.threshold0 = a_threshold; ...;
point.value20 = some_value; point.threshold20 = a_threshold;
Add a metric (resource) to an alerted subresource, for example CPUpoint.addAlertedResource("CPU");
Generate an alert when the days to saturation for CPU, memory, or storage is more than the threshold value

var res = false;

if(Math.round(IND_DAYS_TO_SATURATION.value)<=30) {

if(IND_DAYS_TO_SATURATION.hasSubresource("CPU") && IND_DAYS_TO_SATURATION.subresource("CPU").value<30) {

res = true;

}

if(IND_DAYS_TO_SATURATION.hasSubresource("MEMORY") && IND_DAYS_TO_SATURATION.subresource("MEMORY").value<30) {

res = true;

}

if(IND_DAYS_TO_SATURATION.hasSubresource("STORAGE") && IND_DAYS_TO_SATURATION.subresource("STORAGE").value<30) {

res = true;

}

}

alerted = res;

Generate an alert when CPU utilization value collected from the operating systems is greater than the value collected from hypervisor. 

alerted = (CPU_UTIL.namespace("opt.meas.vn") > CPU_UTIL.value("opt.meas"))

Screenshot with sample data

Examples of parameters

Define parameters as per the following syntax:

<name of parameter> | <description> | <threshold value> | <type>

Where <type> can be a number or a string.

Parameters are used to add new thresholds that can be used in formulas. You can define multiple parameters by separating them with a newline character (press Enter).

The following table contains some examples of parameters that you can add to the Parameters field.

GoalParameter definition

To create a threshold: Days to saturation – Critical threshold, set to a value of 7 (days)

dts_th_crit|Days to saturation critical threshold|7|number

To create a threshold: Days to saturation – Warning threshold, set to a value of 30 (days)

dts_th_warn|Days to saturation warning threshold|30|number

Screenshot with sample data

Example of using parameters in formulas

The following table contains some examples of parameters that are used in a formula in a custom Optimizer rule.

GoalParameter definition

Use the following thresholds in the formula:

  • dts_th_crit|Days to saturation critical threshold|7|number
  • dts_th_warn|Days to saturation warning threshold|30|number

var res = false;
var dts_th = Math.max(dts_th_crit, dts_th_warn);
if (IND_DAYS_TO_SATURATION.value <= dts_th)
{
res = true;
}

Screenshot with sample data

Using Velocity Templates in Recommendation text 

You can use the variables and formatting functions provided by the Velocity template in the Recommendation text field. The following tables and example describe some of these variables and functions.

point/alertpoint

GoalSyntaxSuggested for condition type
Get values and thresholds set in the formula$point.value0, $point.threshold0,...
$point.value20, $point.threshold20,...
Formula
Get a list of alerted metrics (resources)$point.alertedResources;Formula
Format a decimal number$numberFormatter.format(numeric_value);Formula
Get the chosen output resolution$alertpoint.getResolution()Data vs. Threshold
Get the statistic used to perform samples aggregation$alertpoint.getStatistic() Data vs. Threshold
Get the threshold value$alertpoint.getThreshold() Data vs. Threshold
Get the value for the specific alert (can be an aggregated value or related to an hour or timestamp, depending on the selected resolution)$alertpoint.getValue() Data vs. Threshold
Get the selected performance metric$alertpoint.getMetric() Data vs. Threshold
Get the selected time period$alertpoint.getTimePeriod() Data vs. Threshold
Get the comparison logic used to compare the value against the threshold

$alertpoint.getComparator() 

Data vs. Threshold

key/dataFetcher

GoalSyntaxExample output
Get the entity ID

$key

12345

Get the entity name

$dataFetcher.entityDetails($key).name

acme-billing-123

Get the entity description

$dataFetcher.entityDetails($key).description

Pod of Acme Billing service

Get the entity type

$dataFetcher.entityDetails($key).type

sys:kubernetes:pod:wk

Get the tags associated with this entity

#foreach( $tag in $dataFetcher.entityDetails($key).tags)

$tag.type:

#foreach( $tagValue in $tag.values)

$tagValue

#end

#end

ApplTier:

billing

web

Namespace:

Billing

Get the parents name and type associated with this entity

#foreach( $parent in $dataFetcher.entityDetails($key).parents)

Name: $dataFetcher.entityDetails($parent).name

Type: $dataFetcher.entityDetails($parent).type

#end

acme-billing-deployment (sys:kubernetes:deployment)

Get the configuration metrics

CPU_LIMIT: $dataFetcher.entityDetails($key).configurationMetrics['CPU_LIMIT'] cores

CPU_LIMIT: 3 cores

Example of recommendation text or description

The following code block contains an example of a Velocity template description that can be used in the Recommendation text field in the custom Optimizer rule. 

#if ( $point.value0>0)  Forecasted saturation in $numberFormatter.format($point.value0) days. #else Some resources are already saturated. #end 
Details: 
#if ($point.alertedResources.contains('CPU'))  
  #if ($point.value1>0) CPU will saturate in $numberFormatter.format($point.value1) days. 
  #else CPU exhausted. 
  #end 
#end
#if ($point.alertedResources.contains('MEMORY'))  
  #if ($point.value2>0) Memory will saturate in $numberFormatter.format($point.value2) days. 
  #else Memory exhausted. 
  #end 
#end
#if ($point.alertedResources.contains('STORAGE'))  
  #if ($point.value3>0) Storage will saturate in $numberFormatter.format($point.value3) days. 
  #else Storage exhausted. 
  #end 
#end


Structure of a recommendation output

A recommendation output is structured as follows:

alert.cond.1.rule.recomm.vtl = 
Allocate more $stringFormatter.formatList($point.alertedResources)

Setting a status for alerts in the recommendation output

To set a critical status for an alert, you must set the severity as per the ALERT_STATUS table.

For example, to generate a Critical alert whose ID is 3, the structure is as follows:

alert.cond.1.severity = 3

Was this page helpful? Yes No Submitting... Thank you

Comments