VoltDB includes a utility that collects all of the pertinent logs for a given server. The log collector retrieves the necessary system and process files from the server, creates a compressed archive file and, optionally, uploads it via SFTP to a support site. For customers requesting support from VoltDB, your support contact will often provide instructions on how and when to use the log collector and where to submit the files.
Note that the database does not need to be running to use the log collector. It can find and collect the log files based solely on the location of the VoltDB root directory where the database was run.
You can run the log collector from the command line, from within the VoltDB Enterprise Manager, or programmatically through the REST interface (for databases started through REST or the Enterprise Manager). The following sections describe how to run the log collector using the three different environments.
To collect the log files from the command line, use the voltdb collect command:
$ voltdb collect --prefix=mylogs /home/db/voltdbroot
When you run the command you must specify the location of the root directory for the database as an argument to the
command. For example, if you are in the same working directory where the database was originally started, by default the
root directory is the subdirectory
$ voltdb collect --prefix=mylogs $(pwd)/voltdbroot
The archive file that the collect command generates is created in your current working directory.
The collect command has optional arguments that let you control what data is collected, the name
of the resulting archive file, as well as whether to upload the file to an FTP server. In the preceding example the
--prefix flag specifies the prefix for the archive file name. If you are submitting the log files to an
FTP server via SFTP, you can use the
--password flags to identify the target server and account. For example:
$ voltdb collect --prefix=mylogs \ --upload=ftp.mycompany.com \ --username=babbage --password=charles /home/db/voltdbroot
Note that the voltdb collect command collects log files for the current system only. To collect logs for all servers in a cluster, you will need to issue the voltdb collect command locally on each server separately. See the voltdb collect documentation in the Using VoltDB manual for details.
To collect the log files from a database cluster created and managed by the VoltDB Enterprise Manager, it is easiest to use the Enterprise Manager interface. Click on the name of the database on the database list to the left of the dashboard then select the item "Collect logs" from the popup menu.
This menu item brings up a dialog box showing a list of the files and command output that will be collected. The dialog box also has fields so you can control the resulting file prefix, include or exclude the heap dump file, and optionally upload the results via SFTP.
The major difference between using the Enterprise Manager interface and the shell command line is that the Enterprise Manager creates (and optionally uploads) archives for every server in the cluster at once. You do not need to collect logs for each server separately.
Finally, it is possible to invoke the log collector using the REST interface. Invoking the log collector from REST has the same effect as invoking it from within the Enterprise Manager — it collects the logs on all of the servers of the cluster.
The method for collecting logs using the REST interface is
Attributes of the method let you optionally customize the collection in the same way you can from the command line or the
Enterprise Manager interface. For example, the following REST call collects the logs from all of the servers associated
with the database ID 12345, using the file prefix "MyLogs":