This section includes the following topic:

Managing Alerts with CLI

You can manage Precise Alerts using CLI. To manage alerts metrics using CLI

  1. Use the relevant parameters file. To select one, see Parameter Files on page 131.
  2. Run the following command:
    Windows    infra\bin\psin_cli.bat
                       -action alerts-settings
                       -i3-user <user_name>
                       {-i3-encrypted-password <encrypted_password> | -i3-clear-password <clear_password>}
                       -parametersfile <path_to_parameters_file>
    UNIX           ./infra/bin/psin_cli.sh
                       -action alerts-settings
                       -i3-user <user_name>
                       {-i3-encrypted-password <encrypted_password> | -i3-clear-password <clear_password>}
                       -parametersfile <path_to_parameters_file>

Parameter Files

The following are parameter files you can use to manage Alerts with CLI:

  • Enabling/Disabling Alerts
  • Setting Alerts Metrics Actions
  • Clearing Alerts Actions

Enabling/Disabling Alerts

To enable/disable alerts metric use the following parameters file:

<parameter name="metric-settings-action" value="enable-disable" />
<parameter name="metric-set" value="Customized" />
<parameter name="target-instance-server-name" value="server1" />
<parameter name="target-instance-name" value="ORCL" />
<parameter name="target-instance-technology-code" value="OR" />
<parameter name="enable" value="true" />

Table 12-1 Elements for Enabling/Disabling Alerts

ElementDescription
metric-settings-action

Always enable-disable

Mandatory: Yes

metric-set

The metric name.

Values: string

Mandatory: Yes

target-instance-server-name

The related instance server name

Values: String

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-name

The related instance name

Values: string

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-technology-code

The related instance technology code

Values: String. For more information, see Technology Codes on page 174.

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

enable

Values: true/false

Mandatory: Yes

filter-instances-by-technology

Required technology or a comma separated list.

Values: String

Mandatory: Only if specific target parameters are not used.

filter-instances-by-environment

Required application or a comma separated list.

Values: String

Mandatory: Only if specific target parameters are not used.

Setting Alerts Metrics Actions

To set Alert Metrics Actions, use the following parameters file with some of the parameters described in Additional parameterson page 133.

<parameter name="metric-settings-action" value="configure-actions" />
<parameter name="metric-set" value="Customized" />
<parameter name="target-instance-server-name" value="server1" />
<parameter name="target-instance-name" value="ORCL" />
<parameter name="target-instance-technology-code" value="OR" />

Table 12-2 Elements for Setting Alerts Metrics Actions

ElementDescription
metric-settings-action

Values: configure-actions

Mandatory: Yes

metric-set

The metric name.

Values: string

Mandatory: Yes

target-instance-server-name

The related instance server name.

Values: String

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-name

The related instance name.

Values: string

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-technology-code

The related instance technology code

Values: String. For more information, see Technology Codes on page 174.

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

filter-instances-by-technology

Required technology or a comma separated list.

Values: String

Mandatory: Only if specific target parameters are not used.

filter-instances-by-environment

Required environment or a comma separated list.

 Values: String

Mandatory: Only if specific target parameters are not used.

Additional parameters

<parameter name="action-type" value="mail" />
<parameter name="action-email-address" value="adam.aaron@precise.com" />
<parameter name="action-alert-reoccurrence" value="1" />
<parameter name="action-alert-level" value="critical" />
<parameter name="action-email-content" value="Hello!" />
<parameter name="action-inform-mom-snmp-on-level-changing" value="true/false"/>
<parameter name="action-message-text" value="${text}"/>
<parameter name="action-program" value="${program path}"/>
<parameter name="action-program-server" value="alerts-focal/instance"/>
<parameter name="action-inform-mom-snmp-on-level-changing" value="true/false"/>

Table 12-3 Elements for Additional parameters

ElementDescription
action-type

Values:

  • mail
  • message
  • program
  • snmp
  • mom

Mandatory: Yes

action-email-address

Email address

Values: string

Mandatory: Yes, if action type is mail

action-alert-reoccurrence

Alerts recurrence level

Values: Numeric

Mandatory: Yes, if action type is mail

action-alert-level

Alert Level

Values: one of critical or warning

Mandatory: Yes, if action type is mail

action-email-content

Text of the email message

Values: string

Mandatory: Yes, if action type is mail

action-inform-mom-snmp-on-level-changing

Values: true/false

Mandatory: Yes, if action type is mom/snmp

action-message-text

Values: string

Mandatory: Yes, if action type is message

action-program

The program to run

Values: string

Mandatory: Yes, if action type is program

action-program-server

The server to run the program on

Values: string

Mandatory: Yes, if action type is program

action-inform-mom-snmp-on-level-changing

Values: true/false

Mandatory: Yes, if action type is program

Clearing Alerts Actions

To clear Alerts Actions, use the following parameters file:

<parameter name="metric-settings-action" value="remove-actions" />
<parameter name="metric-set" value="Customized" />
<parameter name="target-instance-server-name" value="server1" />
<parameter name="target-instance-name" value="ORCL" />
<parameter name="target-instance-technology-code" value="OR" />
<parameter name="action-types" value="MAIL" />

Table 12-4 Elements for Clearing Alerts Actions

ElementDescription
metric-settings-action

Always remove-actions

Mandatory: Yes

metric-set

The metric name.

Values: string

Mandatory: Yes

target-instance-server-name

The related instance server name

Values: String

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-name

The related instance name

Values: string

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

target-instance-technology-code

The related instance technology code

Values: String. For more information, see Technology Codes on page 174.

Mandatory: Yes, if filter-instances-by-technology or filter-instances-by-environment are not set.

action-types

Values:

  • mail
  • message
  • program
  • snmp
  • mom

Mandatory: Yes

filter-instances-by-technology

Required technology or a comma separated list.

Values: String

Mandatory: Only if specific target parameters are not used.

filter-instances-by-environment

Required application or a comma separated list.

Values: String

Mandatory: Only if specific target parameters are not used.

IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal