Skip to main content

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:

  1. In the Imply Manager UI, click the user icon at the top-right corner of the UI.
  2. Click Master settings.
  3. Click Account.
  4. Enter the Clarity username and password provided to you by Imply into the Clarity user and Clarity password fields and save your settings.
  5. 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:

  1. Open the Imply configuration file, common.runtime.properties.

  2. Add clarity-emitter to druid.extensions.loadList.

    If you specify druid.extensions.loadList for a Druid service independently, update this configuration for each respective service's druid.extensions.loadList and restart the service. For example, if the Broker configuration includes druid.extensions.loadList, then clarity-emitter needs to be added to druid/broker/runtime.properties.

  3. 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.

  4. 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.

FieldTypeDescriptionDefaultRequired
recipientBaseUrlStringHTTP endpoint events will be posted to, such as http://<clarity collector host>:<port>/d/<username>[required]yes
basicAuthenticationStringBasic auth credentials, typically <username>:<password>nullno
clusterNameStringCluster name used to tag eventsnullno
anonymousBooleanDetermines if hostnames should be scrubbed from eventsFALSEno
maxBufferSizeIntegerMaximum size of event buffermin(250 MB, 10% of heap)no
maxBatchSizeIntegerMaximum size of HTTP event payload5 MBno
flushCountIntegerNumber of events before a flush is triggered500no
flushBufferPercentFullIntegerPercentage of buffer fill that will trigger a flush (byte-based)25no
flushMillisIntegerPeriod between flushes if not triggered by flushCount or flushBufferPercentFull60 sno
flushTimeOutIntegerFlush timeoutLong.MAX_VALUEno
timeOutISO8601 PeriodHTTP client response timeoutPT1Mno
batchingStrategyString [ARRAY, NEWLINES]How events are batched together in the payloadARRAYno
compressionString [NONE, LZ4, GZIP]Compression algorithm usedLZ4no
lz4BufferSizeIntegerBlock size for the LZ4 compressor in bytes65536no
samplingRateIntegerPercentage of metrics to emit, for sampled metrics100no
sampledMetricsListThe event types to sample[query/wait/time, query/segment/time, query/segmentAndCache/time]no
sampledNodeTypesListThe 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.

FieldDescriptionDefaultRequired
protocolSSL protocol to use.TLSv1.2no
trustStoreTypeThe type of the key store where trusted root certificates are stored.java.security.KeyStore.getDefaultType()no
trustStorePathThe file path or URL of the TLS/SSL key store where trusted root certificates are stored.noneno
trustStoreAlgorithmAlgorithm to be used by TrustManager to validate certificate chains.javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()no
trustStorePasswordThe Password Provider or String password for the TrustStore.noneyes, 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.

FieldTypeDescriptionDefaultRequired
hostStringThe hostname of the proxy server to connect to.noneyes
portIntegerThe port to connect to on the proxy server.noneyes
userStringUsername for basic auth, if required by the proxy server.noneno
passwordStringPassword for basic auth, if required by the proxy server.noneno