4.7. Managing Alerts

4.7.1. Listing Alerts

4.7.1.1. Syntax

usage: vinfra cluster alert list [-h] [-f {json,table,value,yaml}] [-c COLUMN]
                                 [--all]

List alert log entries

optional arguments:
  -h, --help            show this help message and exit
  --all                 Show both enabled and disabled alerts.
...

4.7.1.2. Sample Output

This command lists all alerts in the log and shows which alerts are enabled and disabled.

# vinfra cluster alert list --all
+----+-----------------+---------------------+----------+---------+
| id | type            | datetime            | severity | enabled |
+----+-----------------+---------------------+----------+---------+
|  1 | Network warning | 2018-08-30T18:02:14 | warning  | True    |
|  2 | Network warning | 2018-08-30T18:02:14 | warning  | True    |
|  3 | Network warning | 2018-08-30T18:02:14 | warning  | True    |
|  4 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
|  5 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
|  6 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
|  7 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
|  8 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
|  9 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 10 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 11 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 12 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 13 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 14 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
| 15 | Network warning | 2018-08-31T13:02:15 | warning  | True    |
+----+-----------------+---------------------+----------+---------+

4.7.2. Showing Alert Details

4.7.2.1. Syntax

usage: vinfra cluster alert show [-h] [-f {json,table,value,yaml}] [-c COLUMN]
                                 <alert>

Show details of the specified alert log entry.

positional arguments:
  <alert>               Alert ID
...

4.7.2.2. Sample Output

This command shows the details of alert with ID 1.

# vinfra cluster alert show 1
+--------------+---------------------------------------------------------------------------+
| Field        | Value                                                                     |
+--------------+---------------------------------------------------------------------------+
| _type        | undefined_speed                                                           |
| cluster_id   |                                                                           |
| cluster_name |                                                                           |
| datetime     | 2018-08-30T18:02:14.855302+00:00                                          |
| details      | host: stor-1.example.com.vstoragedomain.                                  |
| enabled      | True                                                                      |
| group        | node                                                                      |
| host         | stor-1.example.com.vstoragedomain.                                        |
| id           | 1                                                                         |
| message      | Network interface "eth1" on node "stor-1.example.com.vstoragedomain." has |
|              | an undefined speed                                                        |
| node_id      | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55                                      |
| object_id    | eth1                                                                      |
| severity     | warning                                                                   |
| suspended    |                                                                           |
| type         | Network warning                                                           |
+--------------+---------------------------------------------------------------------------+

4.7.3. Removing Alerts from Log

4.7.3.1. Syntax

usage: vinfra cluster alert delete [-h] [-f {json,table,value,yaml}]
                                   [-c COLUMN]
                                   <alert>

Remove an entry from the alert log.

positional arguments:
  <alert>               Alert ID
...

4.7.3.2. Sample Output

This command deletes the alert with the ID 1 from the log.

# vinfra cluster alert delete 1
+--------------+------------------------------------------------------------------------------+
| Field        | Value                                                                        |
+--------------+------------------------------------------------------------------------------+
| _type        | undefined_speed                                                              |
| cluster_id   |                                                                              |
| cluster_name |                                                                              |
| datetime     | 2018-08-30T18:02:14.855302+00:00                                             |
| details      | host: stor-1.example.com.vstoragedomain.                                     |
| enabled      | True                                                                         |
| group        | node                                                                         |
| host         | stor-1.example.com.vstoragedomain.                                           |
| id           | 1                                                                            |
| message      | Network interface "eth1" on node "stor-1.example.com.vstoragedomain." has an |
|              | undefined speed                                                              |
| node_id      | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55                                         |
| object_id    | eth1                                                                         |
| severity     | warning                                                                      |
| suspended    |                                                                              |
| type         | Network warning                                                              |
+--------------+------------------------------------------------------------------------------+