modify_threshold

Edits threshold settings for a given target and metric

Format

emcli modify_threshold
        -target_name="tname"
        -target_type="ttype"
        [-metric="met"]
        [-column="col"]
        [-key_columns="val1;val2;..."]
        [-warning_threshold="warn"]
        [-critical_threshold="crit"]
        [-occurrences="occur"]
        [-prevent_override="0 or 1"]
        [-force]
        [-input_file="FILE:cli_input.txt"]

[ ]  indicates that the parameter is optional

Options

  • target_name

    Name of the target associated with the threshold.

  • target_type

    Type of target associated with the threshold.

  • metric

    Metric category associated with the threshold.

  • column

    Metric column associated with the threshold.

  • key_columns

    Values of the key columns associated with the threshold. If you do not specify this option for a key-based metric, an EM CLI occurs.

  • warning_threshold

    New warning threshold value. Specify " " for no warning threshold. If warning and critical thresholds are incoherent depending on the comparison operator, an EM CLI error occurs .Use -force to save the provided thresholds.To keep the previous value (if any), omit this option.

  • critical_threshold

    New critical threshold value. Specify " " for no warning threshold. If warning and critical thresholds are incoherent depending on the comparison operator, an EM CLI error occurs .Use -force to save the provided thresholds.To keep the previous value (if any), omit this option.

  • occurrences

    Number of times a threshold can be violated before causing an alert. To keep the previous value (if any), omit this option.

  • prevent_override

    Prevents thresholds modification of this metric from future Apply Template operations on this target. Periodic Apply Template operations are submitted on targets managed by Administration Groups, which can override the metric thresholds you set if the prevent_override flag is not set.

    An error occurs if prevent_override is not set in database, you have not provided prevent_override, and the target is managed by Administration Groups. To continue without using prevent_override, use -force.To keep the previous value (if any), omit this option.

  • force

    Saves the provided thresholds incase recommended in previous error messages.

  • input_file

    Provides threshold details for multiple metrics in a text file.Do not provide metric, column, key_columns, warning_threshold, critical_threshold, occurrences and prevent_override in this command when using the input_file option.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

    You can provide the details for multiple metrics in the input file as shown:

            START_RECORD 1
            metric , Filesystems
            column , available
            key_columns , ab;cd;
            warning_threshold , 15
            critical_threshold , 50
            occurrences , 3
            prevent_override , 1
            END_RECORD 1
     
            START_RECORD 2
            metric , Load
            column , cpuUtil
            warning_threshold , 15
            critical_threshold , 50
            occurrences , 3
            prevent_override , 1  
            END_RECORD 2
    
    

    To set the thresholds for the "Al Others" key, provide the details as shown:

            START_RECORD 1
            metric , Filesystems
            column , available
            key_columns , ;
            warning_threshold , 15
            critical_threshold , 50
            occurrences , 1
            END_RECORD 1

Examples

Example 1

This example sets the critical threshold value to "0" for the Load metric, and the cpuUtil column on the host "myhost.example.com". The warning threshold value and response action (if any) remain unchanged.

emcli modify_threshold
          -target_name="myhost.example.com"
          -target_type="host"
          -metric="Load"
          -column="cpuUtil"
          -critical_threshold="0"
          -prevent_override="0"
          -force

Example 2

This example sets the DiskActivitybusy threshold for the DiskActivitydevice called sd0 on the host myhost.example.com.

emcli modify_threshold
          -target_name="myhost.example.com"
          -target_type="host"
          -metric="DiskActivity"
          -column="DiskActivitybusy"
          -key_columns="sd0;"
          -warning_threshold="55"
          -critical_threshold="65"
          -occurrences="3"