Alerts Operation Config Mode Command Reference

alerts active

Displays filtered list of active alerts.

Command Mode

Exec > Global Configuration

Syntax

active filter alerts_filter active { false | true } silenced { false | true } inhibited { false | true } unprocessed { false | true } receiver regex 

active { false | true}

Specify whether to display active alerts.

Must be one of the following:

  • false

  • true

Default Value: true.

filter alerts_filter

Specify the alerts filter in the format label expr value or regex .

Must be a string.

inhibited { false | true}

Specify whether to display inhibited alerts.

Must be one of the following:

  • false

  • true

Default Value: false.

receiver regex

Specify a regex matching receivers to filter alerts.

Must be a string.

silenced { false | true}

Specify whether to display silenced alerts.

Must be one of the following:

  • false

  • true

Default Value: false.

unprocessed { false | true}

Specify whether to display unprocessed alerts.

Must be one of the following:

  • false

  • true

Default Value: false.

Usage Guidelines

Use this command to view filtered list of active alerts.

alerts add-silence

Adds a silence.

Command Mode

Exec > Global Configuration

Syntax

add-silence id silence_id startsAt silence_start_time endsAt silence_end_time createdBy silence_creator_id comment additional_info 

comment additional_info

Specify additional information for the silence.

Must be a string.

createdBy silence_creator_id

Specify the silence creator identity.

Must be a string.

endsAt silence_end_time

Specify the silence end time.

Must be a string in the date-and-time pattern. For information on the date-and-time pattern, see the Input Pattern Types section.

id silence_id

Specify the silence ID to add.

Must be a string in the uuid pattern. For information on the uuid pattern, see the Input Pattern Types section.

startsAt silence_start_time

Specify the silence start time.

Must be a string in the date-and-time pattern. For information on the date-and-time pattern, see the Input Pattern Types section.

Usage Guidelines

Use this command to add a silence.

alerts add-silence matchers

Configures the list of label values to filter alerts.

Command Mode

Exec > Global Configuration

Syntax

matchers alert_label_name value filter_value isRegex { false | true} 

isRegex { false | true}

Specify whether the value is a regular expression or not.

Must be one of the following:

  • false

  • true

value filter_value

Specify the filter value.

Must be a string.

alert_label_name

Specify the alert label name.

Must be a string.

Usage Guidelines

Use this command to configure the list of label values to filter alerts.

alerts delete-silence

Deletes specified silence.

Command Mode

Exec > Global Configuration

Syntax

delete-silence id silence_id_to_delete 

id silence_id_to_delete

Specify the ID of the silence to delete.

Must be a string in the uuid pattern. For information on the uuid pattern, see the Input Pattern Types section.

Usage Guidelines

Use this command to delete specified silence.

alerts history

Displays alerts history.

Command Mode

Exec > Global Configuration

Syntax

history filter alerts_filter 

filter alerts_filter

Specify the comma-separated values to filter alerts.

Must be a string.

Usage Guidelines

Use this command to view alerts history.

alerts silence-by-id

Displays information about a specific silence.

Command Mode

Exec > Global Configuration

Syntax

silence-by-id id silence_id 

id silence_id

Specify the silence ID.

Must be a string in the uuid pattern. For information on the uuid pattern, see the Input Pattern Types section.

Usage Guidelines

Use this command to view information about a specific silence.

alerts silences

Displays filtered list of silences.

Command Mode

Exec > Global Configuration

Syntax

silences filter alerts_filter 

filter alerts_filter

Specify the alerts filter in the format label expr value or regex .

Must be a string.

Usage Guidelines

Use this command to view filtered list of silences.