4.9. Managing Alerts

4.9.1. vinfra cluster alert list

List alert log entries:

usage: vinfra cluster alert list [--all]
--all
Show both enabled and disabled alerts

Example:

# 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    |
+----+-----------------+---------------------+----------+---------+

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

4.9.2. vinfra cluster alert show

Show details of the specified alert log entry:

usage: vinfra cluster alert show <alert>
<alert>
Alert ID

Example:

# 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                                                           |
+--------------+---------------------------------------------------------------------------+

This command shows the details of alert with ID 1.

4.9.3. vinfra cluster alert delete

Remove an entry from the alert log:

usage: vinfra cluster alert delete <alert>
<alert>
Alert ID

Example:

# 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                                                              |
+--------------+------------------------------------------------------------------------------+

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