Coroner Getting Started
Introduction
The coroner
client tool can be used to submit snapshot files (.btt
files) to the object store (coronerd
). If you wish to do command-line querying of the Backtrace object store, use the morgue tool instead.
Configuration
By default, coroner client uses ~/.coroner.cf
as its configuration file. Alternate configurations can be specified by passing the -c
flag to coroner
.
There are two key sections in the coroner
configuration. Within [universe]
, you specify information about the name and URL of your coronerd universe. Within [token]
, you associate a friendly token name with the value of a token you create with the object store web UI. This way, you can use the shorter friendly name within coroner
commands.
Settings for the [universe]
section:
- name: Name of the top-level universe you selected when installing coronerd (typically your organization name)
- write: Full URL to coronerd submission endpoint (typically https://your.server.com:6098
- read: Address and port of coronerd read endpoint (typically your.server.com:4097- leave off the protocol)
- read.ssl.enabled: Enable secure communications over the read endpoint, falseif omitted
- read.ssl.method: Encryption method for secure communications (typically TLSv12)
- curl.ssl_verifyhost: Specify falseto skip certificate verification for secure communications. Use with self-signed certificates.
- curl.ssl_verifypeer: Specify falseto skip certificate verification for secure communications. Use with self-signed certificates.
Below are some example configurations for coroner for common configuration scenarios.
Configuration using CA-trusted certificates
For server-side configuration with CA-trusted certificates, see: Database Install with CA-Trusted Certificates
[universe]
name = myuniversename
write = https://:6098
read = :4097
read.ssl.enabled = true
read.ssl.method = TLSv12
# Below, you will associate the tokens you created in the coroner console (token_id)
# with a concise name (token_name). You will use these token names when submitting
# snapshots to coroner later on.
[token]
=
Configuration using self-signed certificates
For server-side configuration with self-signed certificates, see: Database Install with Self-Signed Certificates
[universe]
name = myuniversename
write = https://:6098
read = :4097
read.ssl.enabled = true
read.ssl.method = TLSv12
curl.ssl_verifyhost = false
curl.ssl_verifypeer = false
# Below, you will associate the tokens you created in the coroner console (token_id)
# with a concise name (token_name). You will use these token names when submitting
# snapshots to coroner later on.
[token]
=
Configuration for unsecured communications
For server-side configuration with no SSL/TLS, see: Database Install with No SSL/TLS
[universe]
name = myuniversename
write = http://:6097
read = :4097
# Below, you will associate the tokens you created in the coroner console (token_id)
# with a concise name (token_name). You will use these token names when submitting
# snapshots to coroner later on.
[token]
=
coroner put - Upload individual snapshots
The most common use for coroner
is to submit individual snapshot to the object store. In fact, this is how the coresnap utility uploads the snapshots that it creates.
To upload a snapshot:
$ coroner put projectname tokenname /path/to/snapshot.btt
You can optionally include -c
to specify a coroner configuration file, and -u
to unlink the snapshot file when the upload is complete.
coroner daemon - Upload snapshots automatically
coroner daemon
is a mode where coroner
continuously monitors a list of folders for snapshot files. Whenever a snapshot is saved to one of these folders, coroner
will upload it to the object store using a specified token, then remove it. This is useful if you have a process that saves snapshots to a central location, and you would like to automatically upload them.
To configure daemon
mode, add a section to your coroner.cf
file called [daemon]
:
[daemon]
proj1.root=/home/jdoe/workspace/proj1
proj1.token=proj1
proj2.root=/home/jdoe/workspace/proj2
proj2.token=proj2
Each root
setting specifies the path to a folder for coroner
to watch, and the corresponding token
specifies the friendly token name to use when doing the upload.
In the example above, when a snapshot file is saved to /home/jdoe/workspace/proj1, coroner daemon
will automatically run the equivalent of coroner put proj1 proj1 /home/jdoe/workspace/proj1/file.btt
Once configured, simply run coroner daemon
and leave it running.