You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since IoTDB **V2.0.9.1**, the access history feature is available. After a client logs in successfully, key historical access information is displayed, and the feature supports distributed deployments. Both administrators and regular users can only view their own access history. The core displayed information includes:
114
+
115
+
- Last successful session: displays date, time, access application, IP address, and access method (not shown for first login or when no history exists).
116
+
- Most recent failed attempt: displays the date, time, access application, IP address, and access method of the latest failed login attempt immediately before the current successful login.
117
+
- Cumulative failed attempts: total number of failed session attempts since the last successful session was established.
118
+
119
+
### 4.1 Enabling Access History
120
+
121
+
You can enable or disable the access history feature by modifying the corresponding parameter in the `iotdb-system.properties` file. A restart is required for changes to take effect. For example:
122
+
123
+
```Plain
124
+
# Controls whether the audit log feature is enabled
125
+
enable_audit_log=false
126
+
```
127
+
128
+
- When enabled: login information is recorded and expired data is cleaned periodically.
129
+
- When disabled: no data is recorded, displayed, or cleaned up.
130
+
- If disabled and then re-enabled, the displayed history will be the last record before the feature was disabled, which may not reflect the actual latest login.
131
+
132
+
Usage example:
133
+
134
+
```Bash
135
+
---------------------
136
+
Starting IoTDB Cli
137
+
---------------------
138
+
_____ _________ ______ ______
139
+
|_ _|| _ _ ||_ _ `.|_ _ \
140
+
|| .--.|_/ ||\_|||`. \ ||_) |
141
+
|| / .'`\ \ | | | | | | | __'.
142
+
_||_|\__. | _||_ _||_.' /_| |__) |
143
+
|_____|'.__.' |_____| |______.'|_______/ Enterprise version 2.0.9.1 (Build: xxxxxxx)
144
+
145
+
146
+
---Last Successful Session------------------
147
+
Time: 2026-03-24T10:25:47.759+08:00
148
+
IP Address: 127.0.0.1
149
+
---Last Failed Session----------------------
150
+
Time: 2026-03-24T10:27:26.314+08:00
151
+
IP Address: 127.0.0.1
152
+
Cumulative Failed Attempts: 1
153
+
Successfully logged in at 127.0.0.1:6667
154
+
IoTDB>
155
+
```
156
+
157
+
### 4.2 Viewing Access History
158
+
159
+
The `root` user and users with the `AUDIT` privilege can view login history records using SQL statements.
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/Tools-System/CLI_timecho.md
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,3 +193,83 @@ It costs 0.267s
193
193
```
194
194
195
195
It should be noted that the use of the -e parameter in shell scripts requires attention to the escaping of special characters.
196
+
197
+
## 5. Access History Feature
198
+
199
+
Since IoTDB **V2.0.9.1**, the access history feature is supported. After a client logs in successfully, key historical access information is displayed, and the feature supports distributed scenarios. Both administrators and regular users can only view their own access history. The core displayed information includes:
200
+
201
+
- Last successful session: displays date, time, access application, IP address, and access method (not shown for first login or when no history exists).
202
+
- Most recent failed attempt: displays the date, time, access application, IP address, and access method of the latest failed login attempt before the current successful login.
203
+
- Cumulative failed attempts: total number of failed session attempts since the last successful session was established.
204
+
205
+
### 5.1 Enabling Access History
206
+
207
+
You can enable or disable the access history feature by modifying relevant parameters in the `iotdb-system.properties` file. A restart is required for changes to take effect. For example:
208
+
209
+
```Plain
210
+
# Controls whether the audit log feature is enabled
211
+
enable_audit_log=false
212
+
```
213
+
214
+
- When enabled: login information is recorded and expired data is cleaned periodically.
215
+
- When disabled: no data is recorded, displayed, or cleaned.
216
+
- If disabled and then re-enabled, the displayed history will be the last record before disabling, which may not represent the actual latest login.
217
+
218
+
Usage example:
219
+
220
+
```Bash
221
+
---------------------
222
+
Starting IoTDB Cli
223
+
---------------------
224
+
_____ _________ ______ ______
225
+
|_ _|| _ _ ||_ _ `.|_ _ \
226
+
|| .--.|_/ ||\_|||`. \ ||_) |
227
+
|| / .'`\ \ | | | | | | | __'.
228
+
_||_|\__. | _||_ _||_.' /_| |__) |
229
+
|_____|'.__.' |_____| |______.'|_______/ Enterprise version 2.0.9.1 (Build: xxxxxxx)
230
+
231
+
232
+
---Last Successful Session------------------
233
+
Time: 2026-03-24T10:25:47.759+08:00
234
+
IP Address: 127.0.0.1
235
+
---Last Failed Session----------------------
236
+
Time: 2026-03-24T10:27:26.314+08:00
237
+
IP Address: 127.0.0.1
238
+
Cumulative Failed Attempts: 1
239
+
Successfully login at 127.0.0.1:6667
240
+
IoTDB>
241
+
```
242
+
243
+
### 5.2 Viewing Access History
244
+
245
+
The `root` user and users with the `AUDIT` privilege can view access history records using SQL statements.
246
+
247
+
Syntax:
248
+
249
+
```SQL
250
+
SELECT*FROMroot.__audit.login.u_{userid}.**
251
+
```
252
+
253
+
The `userid` can be obtained using the `LIST USER` statement.
Since IoTDB **V2.0.9.1**, the access history feature is available. After a client logs in successfully, key historical access information is displayed, and the feature supports distributed deployments. Both administrators and regular users can only view their own access history. The core displayed information includes:
114
+
115
+
- Last successful session: displays date, time, access application, IP address, and access method (not shown for first login or when no history exists).
116
+
- Most recent failed attempt: displays the date, time, access application, IP address, and access method of the latest failed login attempt immediately before the current successful login.
117
+
- Cumulative failed attempts: total number of failed session attempts since the last successful session was established.
118
+
119
+
### 4.1 Enabling Access History
120
+
121
+
You can enable or disable the access history feature by modifying the corresponding parameter in the `iotdb-system.properties` file. A restart is required for changes to take effect. For example:
122
+
123
+
```Plain
124
+
# Controls whether the audit log feature is enabled
125
+
enable_audit_log=false
126
+
```
127
+
128
+
- When enabled: login information is recorded and expired data is cleaned periodically.
129
+
- When disabled: no data is recorded, displayed, or cleaned up.
130
+
- If disabled and then re-enabled, the displayed history will be the last record before the feature was disabled, which may not reflect the actual latest login.
131
+
132
+
Usage example:
133
+
134
+
```Bash
135
+
---------------------
136
+
Starting IoTDB Cli
137
+
---------------------
138
+
_____ _________ ______ ______
139
+
|_ _|| _ _ ||_ _ `.|_ _ \
140
+
|| .--.|_/ ||\_|||`. \ ||_) |
141
+
|| / .'`\ \ | | | | | | | __'.
142
+
_||_|\__. | _||_ _||_.' /_| |__) |
143
+
|_____|'.__.' |_____| |______.'|_______/ Enterprise version 2.0.9.1 (Build: xxxxxxx)
144
+
145
+
146
+
---Last Successful Session------------------
147
+
Time: 2026-03-24T10:25:47.759+08:00
148
+
IP Address: 127.0.0.1
149
+
---Last Failed Session----------------------
150
+
Time: 2026-03-24T10:27:26.314+08:00
151
+
IP Address: 127.0.0.1
152
+
Cumulative Failed Attempts: 1
153
+
Successfully logged in at 127.0.0.1:6667
154
+
IoTDB>
155
+
```
156
+
157
+
### 4.2 Viewing Access History
158
+
159
+
The `root` user and users with the `AUDIT` privilege can view login history records using SQL statements.
Copy file name to clipboardExpand all lines: src/UserGuide/latest/Tools-System/CLI_timecho.md
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,3 +193,83 @@ It costs 0.267s
193
193
```
194
194
195
195
It should be noted that the use of the -e parameter in shell scripts requires attention to the escaping of special characters.
196
+
197
+
## 5. Access History Feature
198
+
199
+
Since IoTDB **V2.0.9.1**, the access history feature is supported. After a client logs in successfully, key historical access information is displayed, and the feature supports distributed scenarios. Both administrators and regular users can only view their own access history. The core displayed information includes:
200
+
201
+
- Last successful session: displays date, time, access application, IP address, and access method (not shown for first login or when no history exists).
202
+
- Most recent failed attempt: displays the date, time, access application, IP address, and access method of the latest failed login attempt before the current successful login.
203
+
- Cumulative failed attempts: total number of failed session attempts since the last successful session was established.
204
+
205
+
### 5.1 Enabling Access History
206
+
207
+
You can enable or disable the access history feature by modifying relevant parameters in the `iotdb-system.properties` file. A restart is required for changes to take effect. For example:
208
+
209
+
```Plain
210
+
# Controls whether the audit log feature is enabled
211
+
enable_audit_log=false
212
+
```
213
+
214
+
- When enabled: login information is recorded and expired data is cleaned periodically.
215
+
- When disabled: no data is recorded, displayed, or cleaned.
216
+
- If disabled and then re-enabled, the displayed history will be the last record before disabling, which may not represent the actual latest login.
217
+
218
+
Usage example:
219
+
220
+
```Bash
221
+
---------------------
222
+
Starting IoTDB Cli
223
+
---------------------
224
+
_____ _________ ______ ______
225
+
|_ _|| _ _ ||_ _ `.|_ _ \
226
+
|| .--.|_/ ||\_|||`. \ ||_) |
227
+
|| / .'`\ \ | | | | | | | __'.
228
+
_||_|\__. | _||_ _||_.' /_| |__) |
229
+
|_____|'.__.' |_____| |______.'|_______/ Enterprise version 2.0.9.1 (Build: xxxxxxx)
230
+
231
+
232
+
---Last Successful Session------------------
233
+
Time: 2026-03-24T10:25:47.759+08:00
234
+
IP Address: 127.0.0.1
235
+
---Last Failed Session----------------------
236
+
Time: 2026-03-24T10:27:26.314+08:00
237
+
IP Address: 127.0.0.1
238
+
Cumulative Failed Attempts: 1
239
+
Successfully login at 127.0.0.1:6667
240
+
IoTDB>
241
+
```
242
+
243
+
### 5.2 Viewing Access History
244
+
245
+
The `root` user and users with the `AUDIT` privilege can view access history records using SQL statements.
246
+
247
+
Syntax:
248
+
249
+
```SQL
250
+
SELECT*FROMroot.__audit.login.u_{userid}.**
251
+
```
252
+
253
+
The `userid` can be obtained using the `LIST USER` statement.
0 commit comments