5.12. Managing alerts¶
5.12.1. vinfra cluster alert list¶
List alert log entries:
usage: vinfra cluster alert list [--long] [--all]
--long
- Enable access and listing of all fields of objects.
--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 whether they are enabled or disabled.
5.12.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: node001.vstoragedomain. |
| enabled | True |
| group | node |
| host | node001.vstoragedomain. |
| id | 1 |
| message | Network interface "eth1" on node "node001.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.
5.12.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: node001.vstoragedomain. |
| enabled | True |
| group | node |
| host | node001.vstoragedomain. |
| id | 1 |
| message | Network interface "eth1" on node "node001.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.
Oct 06, 2020