5.13. Managing audit log

5.13.1. vinfra cluster auditlog list

List all audit log entries:

usage: vinfra cluster auditlog list [--long]
--long
Enable access and listing of all fields of objects.

Example:

# vinfra cluster auditlog list
+----+----------+------------------------+---------------------------+---------------------+
| id | username | type                   | activity                  | timestamp           |
+----+----------+------------------------+---------------------------+---------------------+
|  1 | admin    | LoginUser              | User login                | 2018-09-07T08:33:44 |
|  2 | admin    | ChangeNetwrokInterface | Configure network         | 2018-09-07T09:53:58 |
|  3 | admin    | UpInterface            | Bring up interface        | 2018-09-07T09:54:44 |
|  4 | admin    | ChangeNetwrokInterface | Configure network         | 2018-09-07T09:54:54 |
|  5 | admin    | CreateBonding          | Create bonding            | 2018-09-07T09:57:24 |
| 17 | admin    | RemoveNode             | Forget node               | 2018-09-07T12:21:59 |
| 14 | admin    | RemoveNetworkIface     | Delete interface          | 2018-09-07T12:17:14 |
| 15 | admin    | RemoveNode             | Forget node               | 2018-09-07T12:17:49 |
|  6 | admin    | UpInterface            | Bring up interface        | 2018-09-07T10:59:28 |
|  7 | admin    | ChangeNetwrokInterface | Configure network         | 2018-09-07T10:59:46 |
|  9 | admin    | UpInterface            | Bring up interface        | 2018-09-07T11:42:29 |
| 10 | admin    | UpInterface            | Bring up interface        | 2018-09-07T11:42:42 |
| 11 | admin    | CreateBonding          | Create bonding            | 2018-09-07T11:43:46 |
| 12 | admin    | ChangeNetwrokInterface | Configure network         | 2018-09-07T11:52:17 |
| 13 | admin    | ChangeNetwrokInterface | Configure network         | 2018-09-07T11:52:44 |
| 16 | admin    | RemoveNode             | Forget node               | 2018-09-07T12:21:51 |
|  8 | admin    | CreateBonding          | Create bonding            | 2018-09-07T11:00:39 |
| 18 | admin    | RemoveNode             | Forget node               | 2018-09-07T12:22:08 |
| 19 | admin    | UpInterface            | Bring up interface        | 2018-09-07T12:33:16 |
| 20 | admin    | CreateVLAN             | Create VLAN               | 2018-09-07T12:34:18 |
| 21 | admin    | RemoveNetworkIface     | Delete interface          | 2018-09-07T13:26:40 |
| 22 | admin    | LoginUser              | User login                | 2018-09-07T14:50:06 |
| 23 | admin    | LoginUser              | User login                | 2018-09-07T14:51:34 |
| 24 | admin    | CreateNetworkRolesSet  | Create custom role set    | 2018-09-07T15:06:03 |
| 25 | admin    | ChangeNetworkRolesSet  | Configure custom role set | 2018-09-07T15:37:50 |
| 26 | admin    | RemoveNetworkRolesSet  | Remove custom role set    | 2018-09-07T15:39:31 |
| 27 | admin    | CreateNetworkRole      | Create custom role        | 2018-09-07T15:58:50 |
| 28 | admin    | RemoveNetworkRole      | Remove custom role        | 2018-09-07T16:20:22 |
+----+----------+------------------------+---------------------------+---------------------+

This command lists the audit log entries.

5.13.2. vinfra cluster auditlog show

Show details of an audit log entry:

usage: vinfra cluster auditlog show <auditlog>
<auditlog>
Audit log ID

Example:

# vinfra cluster auditlog show 1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| activity     | User login                       |
| cluster_id   |                                  |
| cluster_name |                                  |
| component    | Users                            |
| details      | []                               |
| id           | 1                                |
| message      | User "admin" login               |
| node_id      |                                  |
| result       | success                          |
| session_id   | 817a19beaf244f92604fbf4b40af2c29 |
| task_id      | 5686556295049300                 |
| timestamp    | 2018-09-07T08:33:44.175797+00:00 |
| type         | LoginUser                        |
| username     | admin                            |
+--------------+----------------------------------+

This command shows the details of the audit log entry with the ID 1.