Skip to content

Commit a22db5d

Browse files
Sync docs from Discourse (#494)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 335674c commit a22db5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+439
-190
lines changed
File renamed without changes.

docs/explanation/e-logs.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ root@mysql-k8s-0:/# ls -lahR /var/log/mysql
1010
total 28K
1111
drwxr-xr-x 1 mysql mysql 4.0K Oct 23 20:46 .
1212
drwxr-xr-x 1 root root 4.0K Sep 27 20:55 ..
13+
drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:46 archive_audit
1314
drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:46 archive_error
1415
drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:46 archive_general
1516
drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:45 archive_slowquery
1617
-rw-r----- 1 mysql mysql 1.2K Oct 23 20:46 error.log
1718
-rw-r----- 1 mysql mysql 1.7K Oct 23 20:46 general.log
1819

20+
/var/snap/charmed-mysql/common/var/log/mysql/archive_audit:
21+
total 452K
22+
drwxrwx--- 2 snap_daemon snap_daemon 4.0K Sep 3 01:49 .
23+
drwxr-xr-x 6 snap_daemon root 4.0K Sep 3 01:49 ..
24+
-rw-r----- 1 snap_daemon root 43K Sep 3 01:24 audit.log-20240903_0124
25+
-rw-r----- 1 snap_daemon root 109K Sep 3 01:25 audit.log-20240903_0125
26+
1927
/var/log/mysql/archive_error:
2028
total 20K
2129
drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:46 .
@@ -36,6 +44,21 @@ drwxrwx--- 2 mysql mysql 4.0K Oct 23 20:45 .
3644
drwxr-xr-x 1 mysql mysql 4.0K Oct 23 20:46 ..
3745
```
3846

47+
The following is a sample of the audit logs, with format json with login/logout records:
48+
49+
```json
50+
{"audit_record":{"name":"Connect","record":"17_2024-09-03T01:52:14","timestamp":"2024-09-03T01:53:14Z","connection_id":"988","status":1156,"user":"","priv_user":"","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
51+
{"audit_record":{"name":"Connect","record":"18_2024-09-03T01:52:14","timestamp":"2024-09-03T01:53:14Z","connection_id":"989","status":0,"user":"serverconfig","priv_user":"serverconfig","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
52+
{"audit_record":{"name":"Quit","record":"1_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:14Z","connection_id":"989","status":0,"user":"serverconfig","priv_user":"serverconfig","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
53+
{"audit_record":{"name":"Connect","record":"2_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"990","status":1156,"user":"","priv_user":"","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
54+
{"audit_record":{"name":"Connect","record":"3_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"991","status":0,"user":"serverconfig","priv_user":"serverconfig","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
55+
{"audit_record":{"name":"Quit","record":"4_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"991","status":0,"user":"serverconfig","priv_user":"serverconfig","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
56+
{"audit_record":{"name":"Connect","record":"5_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"992","status":0,"user":"clusteradmin","priv_user":"clusteradmin","os_login":"","proxy_user":"","host":"localhost","ip":"","db":""}}
57+
{"audit_record":{"name":"Quit","record":"6_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"992","status":0,"user":"clusteradmin","priv_user":"clusteradmin","os_login":"","proxy_user":"","host":"localhost","ip":"","db":""}}
58+
{"audit_record":{"name":"Connect","record":"7_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"993","status":1156,"user":"","priv_user":"","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
59+
{"audit_record":{"name":"Connect","record":"8_2024-09-03T01:53:14","timestamp":"2024-09-03T01:53:33Z","connection_id":"994","status":0,"user":"serverconfig","priv_user":"serverconfig","os_login":"","proxy_user":"","host":"juju-da2225-8","ip":"10.207.85.214","db":""}}
60+
```
61+
3962
The following is a sample of the error logs, with format `time thread [label] [err_code] [subsystem] msg`:
4063

4164
```shell
@@ -100,19 +123,19 @@ SET timestamp=1698099752;
100123
do sleep(15);
101124
```
102125
103-
The charm currenly has error and general logs enabled by default, while slow query logs are disabled by default. All of these files are rotated if present into a separate dedicated archive folder under the logs directory.
126+
The charm currently has error and general logs enabled by default, while slow query logs are disabled by default. All of these files are rotated if present into a separate dedicated archive folder under the logs directory.
104127
105128
We do not yet support the rotation of binary logs (binlog, relay log, undo log, redo log, etc).
106129
107130
## Log Rotation Configurations
108131
109-
For each log (error, general and slow query):
132+
For each log (audit, error, general and slow query):
110133
111134
- The log file is rotated every minute (even if the log files are empty)
112135
- The rotated log file is formatted with a date suffix of `-%V-%H%M` (-weeknumber-hourminute)
113136
- The rotated log files are not compressed or mailed
114137
- The rotated log files are owned by the `snap_daemon` user and group
115-
- The rotated log files are retained for a maximux of 7 days before being deleted
138+
- The rotated log files are retained for a maximum of 7 days before being deleted
116139
- The most recent 10080 rotated log files are retained before older rotated log files are deleted
117140
118141
The following are logrotate config values used for log rotation:

docs/how-to/h-async/h-async-clients.md renamed to docs/how-to/h-async-clients.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Clients for Async replication
2-
> **WARNING**: it is an '8.0/candidate' article. Do NOT use it in production!<br/>Contact [Canonical Data Platform team](/t/11868) if you are interested in the topic.
32

43
## Pre-requisits
54
Make sure both `Rome` and `Lisbon` Clusters are deployed using the [Async Deployment manual](/t/13458)!

docs/how-to/h-async/h-async-deployment.md renamed to docs/how-to/h-async-deployment.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# Deploy Async replication
2-
[note type="caution"]
3-
**Warning**: This feature is for charm revision `8.0/edge`. Do NOT use it in production!
4-
5-
Contact the [Canonical Data Platform team](/t/11868) if you are interested in this topic.
6-
[/note]
72

83
## Deploy
94

docs/how-to/h-async/h-async-failover.md renamed to docs/how-to/h-async-failover.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Switchover / Failover of Async replication
22

3-
> **WARNING**: it is an '8.0/edge' article. Do NOT use it in production!<br/>Contact [Canonical Data Platform team](/t/11868) if you are interested in the topic.
4-
53
## Pre-requisits
64

75
Make sure both `Rome` and `Lisbon` Clusters are deployed using the [Async Deployment manual](/t/13458)!

docs/how-to/h-async/h-async-recovery.md renamed to docs/how-to/h-async-recovery.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Recovery of Async replication
2-
> **WARNING**: it is an '8.0/candidate' article. Do NOT use it in production!<br/>Contact [Canonical Data Platform team](/t/11868) if you are interested in the topic.
32

43
## Pre-requisits
54
Make sure both `Rome` and `Lisbon` Clusters are deployed using the [Async Deployment manual](/t/13458)!

docs/how-to/h-async/h-async-removal.md renamed to docs/how-to/h-async-removal.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Removal of Async replication
22

3-
> **WARNING**: it is an '8.0/edge' article. Do NOT use it in production!<br/>Contact [Canonical Data Platform team](/t/11868) if you are interested in the topic.
4-
53
## Pre-requisits
64

75
Make sure both `Rome` and `Lisbon` Clusters are deployed using the [Async Deployment manual](/t/13458)!
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)