To monitor an Imply cluster, you can use:
- Clarity, a visual performance analysis tool that lets you identify and solve performance issues of an Imply cluster.
- Status APIs, endpoints served by Druid that return system state representing the health and performance of the cluster.
- In cloud deployments, you can further enable monitoring of the metadata store (Amazon RDS, by default) using CloudWatch. See Monitoring the metadata store with CloudWatch for more information.
On Imply Cloud, you can access Clarity from the Manager console. To do so, from the cluster overview page, click Monitor from the left menu.
When deploying Imply Private on-prem or to your own cloud provider account, there are two ways you can use Clarity:
- As a SaaS instance hosted by Imply. Access to hosted Clarity is included with your Imply subscription, at clarity.imply.io.
- As a local instance that you set up and host yourself.
Clarity is bundled with Pivot, so if running Clarity locally, no extra installations is required. However, you need to perform a few extra configuration steps to enable the Clarity, as described next.
If you are using Imply-hosted Clarity, you only need to enable metric emission on your Druid cluster, as described in step 2 below, below.
Navigating the Clarity UI
By default, Clarity opens in the Visuals pane:
From the Clarity home page, you can access various views, including:
- Queries views include:
- Broker Queries shows telemetry from your query servers and gives you an overview of query performance, including average, 98th percentile, and maximum query times. It allows you to break down performance by data source, server, properties of the query (e.g., query type, number of dimensions queried), and even individual query IDs.
- Historical Queries lets you drill into the performance of individual data servers involved in each of your queries. A single Druid query will access many data nodes — each one handling a different slice of your data — and this view allows you to see how that fan-out affects query performance. Like the Broker Queries view, it can be broken down by data source, server, properties of the query (e.g., query type, number of dimensions queried), and individual query IDs.
- Ingestion shows telemetry from real-time ingestion.
- Server shows information about JVM memory allocation, including garbage collection.
- Exceptions show error conditions reported by your servers.
It's a good practice to open the Clarity UI regularly to inspect the performance of your Imply cluster. In addition,
by configuring alerts, you can have Clarity notify you when a condition is met. You can configure conditions to evaluate
query times, exception counts, and more.
You can configure alerts from the Alerts tab:
Clarity alerts are configured in the same way as other Pivot alerts. For more information, see Pivot Alerts. Note that Slack webhooks for alerts only work in on-premises deployments; you cannot use Slack webhooks in Imply Cloud deployments.
Clarity emitter configurations
You can control the way Druid emits metrics by adding the following properties to the Druid properties file, common.runtime.properties, of the metrics emitting cluster.
druid.emitter.clarity. as a prefix to the field names shown, for example,
|String||HTTP endpoint events will be posted to, e.g. ||[required]||yes|
|String||Kafka "bootstrap.servers" configuration (a list of brokers)||[required]||yes|
|String||Can be used to specify any other Kafka producer property.||empty||no|
|String||Cluster name used to tag events||null||no|
|Boolean||Should hostnames be scrubbed from events?||false||no|
|Integer||Maximum size of event buffer||min(250MB, 10% of heap)||no|
|Integer||For sampled metrics, what percentage of metrics will be emitted||100||no|
|List||Which event types are sampled||["query/wait/time", "query/segment/time", "query/segmentAndCache/time"]||no|
|List||Which node types are sampled||["druid/historical", "druid/peon", "druid/realtime"]||no|
Druid Status APIs
Druid includes status APIs that return metrics that help you gauge the health of the system. The following APIs are especially useful for monitoring.
Unavailable segments: On the Coordinator, check
/druid/coordinator/v1/loadstatus?simpleand verify each datasource registers "0". This is the number of unavailable segments. It may briefly be non-zero when new segments are added, but if this value is high for a prolonged period of time, it indicates a problem with segment availability in your cluster. In this case, check your data nodes to confirm they are healthy, have spare disk space to load data, and have access to your S3 bucket where data is stored.
Data freshness: Run a "dataSourceMetadata" query to get the "maxIngestedEventTime" and verify that it's recent enough for your needs. For example, alert if it's more than a few minutes old. This is an inexpensive Druid query, since it only hits the most recent segments and it only looks at the last row of data. In addition to verifying ingestion time, this also verifies that Druid is responsive to queries. If this value is staler than you expect, it can indicate that real-time data is not being loaded properly. In this case, use the Imply Manager to verify that your data ingestion is healthy, that there have not been any errors loading data, and that you have enough capacity to load the amount of data that you're trying to load.
See Druid API reference for more information.