Monitoring
Crux can expose metrics about a node via Dropwizard to Prometheus, AWS’s CloudWatch, and Java’s JMX.
We expose metrics about transaction ingestion and running queries; if you use RocksDB you can also expose internal RocksDB metrics.
Project Dependency
In order to use any of the crux-metrics
reporters, you will need to include the following dependency on crux-metrics
:
pro.juxt.crux/crux-metrics {:mvn/version "1.18.1"}
<dependency>
<groupId>pro.juxt.crux</groupId>
<artifactId>crux-metrics</artifactId>
<version>1.18.1</version>
</dependency>
You will also need to include dependencies for your individual reporters - these are outlined below.
Metrics module
The Crux metric reporters depend on a common metrics module:
{
"crux.metrics/metrics": { ... },
}
{:crux.metrics/metrics { ... }}
{:crux.metrics/metrics { ... }}
You can omit this if you’re happy with its default parameters.
Prometheus reporter
Prometheus HTTP exporter
AWS Cloudwatch
In addition to extra dependencies, you’ll need to ensure that your application has the cloudwatch:PutMetricData
permission.
Parameters
-
registry
(registry, defaults to shared registry) -
high-resolution?
(boolean, default false): increase push rate from 1 minute to 1 second -
dimensions
(Map<String, String>
): dimensions to include in the pushed metrics -
jvm-metrics?
(boolean, default false): includes JVM metrics in the pushed metrics -
region
(string): override default AWS region for uploading metrics -
ignore-rules
(List<String>
): a list of metrics to ignore, in gitignore format. e.g.["crux.tx" "!crux.tx.ingest"]
would ignorecrux.tx.*
, exceptcrux.tx.ingest
-
dry-run?
(boolean, default false): reporter outputs to a local SLF4J logger instead -
dry-run-report-frequency
(string/Duration
, default"PT1S"
)