Set up SaaS Clarity
You can configure on-prem Imply to use SaaS Clarity to monitor your Imply deployment. This topic describes how to set up Imply to use SaaS Clarity.
Imply Enterprise with SaaS Clarity
Before you start to set up Imply for SaaS Clarity, request API credentials for your Clarity account. Once you have that information, you can configure Clarity as follows.
For managed Imply
If you use the Imply Manager with Imply Enterprise (formerly Imply Private), follow these steps to enable Clarity:
- In the Imply Manager UI, click the user icon at the top-right corner of the UI.
- Click Master settings.
- Click Account.
- Enter the Clarity username and password provided to you by Imply into the Clarity user and Clarity password fields and save your settings.
- Restart all nodes in the cluster.
All clusters should now report metrics to your SaaS Clarity account.
For unmanaged Imply
If you do not use Imply Manager with Imply Enterprise, follow these steps to enable Clarity:
Open the Imply configuration file,
common.runtime.properties
.Add
clarity-emitter
todruid.extensions.loadList
.If you specify
druid.extensions.loadList
for a Druid service independently, update this configuration for each respective service'sdruid.extensions.loadList
and restart the service. For example, if the Broker configuration includesdruid.extensions.loadList
, thenclarity-emitter
needs to be added todruid/broker/runtime.properties
.Add the following emitter configuration settings at the end of the file. If you have existing emitter configs, remove those first.
# Enable JVM monitoring.
druid.monitoring.monitors=["org.apache.druid.java.util.metrics.JvmMonitor"]
# Enable Clarity emitter.
druid.emitter=clarity
# API details provided by Imply.
druid.emitter.clarity.recipientBaseUrl=https://cc.imply.io/d/<orgname>
druid.emitter.clarity.basicAuthentication=<orgname>:<apikey>
# Cluster name; should be different for each cluster.
druid.emitter.clarity.clusterName=<my-cluster-name>Note additional settings in Optional Clarity emitter configurable properties.
Restart all nodes in the cluster.
Optional Clarity emitter configurable properties
You can configure Clarity behavior and settings by adding the following properties to the Druid properties file, common.runtime.properties
. Prepend all properties with druid.emitter.clarity.
followed by the field name. For example, druid.emitter.clarity.recipientBaseUrl
.
Field | Type | Description | Default | Required |
---|---|---|---|---|
recipientBaseUrl | String | HTTP endpoint events will be posted to, such as http://<clarity collector host>:<port>/d/<username> | [required] | yes |
basicAuthentication | String | Basic auth credentials, typically <username>:<password> | null | no |
clusterName | String | Cluster name used to tag events | null | no |
anonymous | Boolean | Determines if hostnames should be scrubbed from events | FALSE | no |
maxBufferSize | Integer | Maximum size of event buffer | min(250 MB, 10% of heap) | no |
maxBatchSize | Integer | Maximum size of HTTP event payload | 5 MB | no |
flushCount | Integer | Number of events before a flush is triggered | 500 | no |
flushBufferPercentFull | Integer | Percentage of buffer fill that will trigger a flush (byte-based) | 25 | no |
flushMillis | Integer | Period between flushes if not triggered by flushCount or flushBufferPercentFull | 60 s | no |
flushTimeOut | Integer | Flush timeout | Long.MAX_VALUE | no |
timeOut | ISO8601 Period | HTTP client response timeout | PT1M | no |
batchingStrategy | String [ARRAY, NEWLINES] | How events are batched together in the payload | ARRAY | no |
compression | String [NONE, LZ4, GZIP] | Compression algorithm used | LZ4 | no |
lz4BufferSize | Integer | Block size for the LZ4 compressor in bytes | 65536 | no |
samplingRate | Integer | Percentage of metrics to emit, for sampled metrics | 100 | no |
sampledMetrics | List | The event types to sample | [query/wait/time , query/segment/time , query/segmentAndCache/time ] | no |
sampledNodeTypes | List | The node types to sample | [druid/historical , druid/peon , druid/realtime ] | no |
SSL options
Clarity HTTP supports HTTPS (TLS) without any special configuration.
If you need to use a custom trust store, you can specify the extra configurations in the following table.
Prepend all properties with druid.emitter.clarity.ssl.
—for example, druid.emitter.clarity.ssl.protocol
.
If you do not specify trustStorePath
, a custom SSL context is not created; the default SSL context is used instead.
Field | Description | Default | Required |
---|---|---|---|
protocol | SSL protocol to use. | TLSv1.2 | no |
trustStoreType | The type of the key store where trusted root certificates are stored. | java.security.KeyStore.getDefaultType() | no |
trustStorePath | The file path or URL of the TLS/SSL key store where trusted root certificates are stored. | none | no |
trustStoreAlgorithm | Algorithm to be used by TrustManager to validate certificate chains. | javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm() | no |
trustStorePassword | The Password Provider or String password for the TrustStore. | none | yes, if trustStorePath is specified. |
Proxy server options
You can configure the Clarity emitter to connect to Clarity through a proxy server via HTTP tunneling
with the CONNECT
method.
Set the following properties to configure the proxy connection.
Prepend all properties with druid.emitter.clarity.proxy.
—for example, druid.emitter.clarity.proxy.host
.
Field | Type | Description | Default | Required |
---|---|---|---|---|
host | String | The hostname of the proxy server to connect to. | none | yes |
port | Integer | The port to connect to on the proxy server. | none | yes |
user | String | Username for basic auth, if required by the proxy server. | none | no |
password | String | Password for basic auth, if required by the proxy server. | none | no |