Creating an alternate directory for diagnostic information
Create an alternate directory to save diagnostic data when generating a diagnostic report.
When a request is issued for diagnostic information, OpsCenter requests each DataStax Agent to run diagnostic commands, and collect logs and configuration files. Each DataStax Agent reports diagnostic data to OpsCenter, which temporarily places that data in the /tmp directory to construct a compressed tarball.
Depending on the OpsCenter server configuration, the /tmp directory might not have capacity to store the collected data from the DataStax Agents. This lack of space can result in different errors, causing the diagnostic collection to fail.
Complete the following steps to provide an alternate working directory for OpsCenter to use for diagnostic data collection.
Procedure
-
Create a new directory on the file system, other than
/tmp.
mkdir diagnostic_directory
-
Grant the OpsCenter user full read and write permissions to the directory. In
some cases, it might be necessary to grant permissions on the parent directory
as well.
sudo chmod -R 660 diagnostic_directory
-
Open the
opscenter
script in a terminal or text editor.- Package installs: /usr/share/opscenter/bin
- Tarball installs: install_location/bin
vim opscenter
-
Add the following line before the line indicating
RUN_IN_BACKGROUND=1
.export TMPDIR="path_to/diagnostic_directory"
-
Save and close the
opscenter
script. - Restart OpsCenter for the changes to take effect.
- Download diagnostic data as a compressed tarball.
Errors caused by lack of space in temporary file system
Depending on the version of OpsCenter installed, the following errors can display if insufficient space is available to generate the diagnostic tarball.
Not enough space to store all data for diagnostic tarball
Can't write out diagnostic file for OpsCenter machine, because it will fill up a disk
In addition to the previous error messages being displayed in the OpsCenter console, the following messages can be reported in opscenterd.log.
Not enough space to store all data for diagnostic tarball
Not enough space to write the diagnostic file out on OpsCenter machine