Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

SoS report

SoS is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems.

You can use the built-in version of SoS, or retrieve the latest version from GitHub.

Always review the collected data before sharing it!

The generated archive may contain sensitive data. Its content should be reviewed by the originating organization before being passed to any third party.

Use built-in SoS (recommended)

The newly created SOS plugin charmed_mysql might still be missing on your installation, consider to update sosreport apt package to version 4.10+ or use the latest sos plugins from Git (described below).

Charmed MySQL shipped with built-in SoS reporting tool. You can use it to collect logs on a specific unit or multiple units at once.

Collect logs on one unit

To generate the troubleshooting report archiving all logs simply call sos report inside the relevant Juju unit:

juju ssh mysql/0
> sudo sos report -o system,systemd,snap,charmed_mysql --low-priority

As a result, the archive will all logs will be generated and can be shared with your support representative:

...
Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-chdmwlz.tar.xz

 Size	216.36KiB
 Owner	root
 sha256	b3bf2c54bb3d934ca61ab2a17c19e98b2abeafd45589f268b62bd02f6b2a4c5f
...

Use juju scp to copy logs from Juju unit to localhost:

juju scp mysql/0:/tmp/sosreport-juju-d4c067-1-2025-04-07-chdmwlz.tar.xz .
Example output
juju ssh mysql/0

ubuntu@juju-d4c067-1:~$ sudo sos report -o system,systemd,snap,charmed_mysql --low-priority

sos report (version 4.8.2)

This command will collect system configuration and diagnostic
information from this Ubuntu system.

For more information on Canonical visit:

        Community Website  : https://www.ubuntu.com/
        Commercial Support : https://www.canonical.com

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


Press ENTER to continue, or CTRL-C to quit.

Optionally, please enter the case id that you are generating this report for []: 

 Setting up archive ...
 Setting up plugins ...
 Running plugins. Please wait ...

  Starting 4/4   systemd         [Running: charmed_mysql system snap systemd]
  Finishing plugins              [Running: charmed_mysql]                            
  Finished running plugins                                                               
Creating compressed archive...

Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-qntyqpz.tar.xz

 Size	285.60KiB
 Owner	root
 sha256	d318d7de7595ebae1bce093a375129fafbd397c297317de3006fbfe45e93d43d

Please send this file to your support representative.

ubuntu@juju-d4c067-1:~$ exit

juju scp mysql/0:/tmp/sosreport-juju-d4c067-1-2025-04-07-qntyqpz.tar.xz .

Collect logs from several units

The sos tool allows you to collect logs from several Juju units (replace <UNIT_A/B/…> labels with proper Juju unit like mysql/0).

Run the following command from outside the Juju units:

sos collect --cluster-type juju --no-local -c "juju.units=<UNIT_A>,<UNIT_B>,<...>" --batch -o system,systemd,snap,charmed_mysql --low-priority

Use the latest sos plugins from Git

The latest version of sos plugins can be retrieved from Git easily:

git clone https://github.com/sosreport/sos.git
cd sos
sudo ./bin/sos report -­a

The output will be the same to the example above providing archive with all logs as above:

Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-egosqmi.tar.xz

Last updated 4 days ago. Help improve this document in the forum.