This repository will contain Dashboard that provides online Knot.x monitoring.
Currently only a metrics-sender
module is implemented.
This simple Knot.x module sends Vert.x Dropwizard metrics gathered by another Knot.x modules to Graphite.
This guide assumes that you already have running Knot.x instance that is setup with Knot.x stack.
Prerequisites
- Graphite instance setup
- (Optional) Grafana setup
Do the following steps to start sending Knot.x application metrics to Graphite:
- Add
knotx-stack
dependency toknotx-stack.json
:
{
"groupId": "io.knotx",
"artifactId": "knotx-dashboard",
"version": "X.Y.Z",
"included": true
}
- Run
bin\knotx resolve
to resolve new dependencies and addmetrics-sender
to the instance classpath - Add
metricSender
entry toapplication.conf
modules list
"metricsSender=io.knotx.metrics.SenderVerticle"
- Copy
conf/dashboardStack.conf
to applicationconf
folder - Add
dashboardStack.conf
to application stores defined inbootstrap.json
, e.g.
...
"stores": [
...
{
"type": "file",
"format": "conf",
"config": {
"path": "${KNOTX_HOME}/conf/dashboardStack.conf"
}
}
]
...
- Define Graphite connection in
conf/dashboardStack.conf
(by default it's set tolocalhost:2003
). - Uncomment
METRICS_OPTS
line inbin/knotx
:
METRICS_OPTS="-Dvertx.metrics.options.enabled=true -Dvertx.metrics.options.registryName=knotx-dropwizard-registry"
- Optionally add
-Dknotx.metrics.options.prefix=<custom prefix>
toMETRICS_OPTS
- Optionally configure other metrics sender parameters in
conf/dashboardStack.conf
- Optionally configure metrics to gather event-bus data:
- copy
conf/metrics-options.json
toconf
directory of Knot.x instance - append
METRICS_OPTS
inbin/knotx
with-Dvertx.metrics.options.configPath=conf/metrics-options.json
- define datasource endpoint entries in
monitoredHttpClientEndpoints
section to monitor its traffic, e.g.
{ "alias": "googleapis", "value": "www.googleapis.com:443" }
- for more information about metrics settings see vertx-dropwizard-metrics docs
- copy
Before running Knot.x with metrics you need a Graphite instance that metrics will be pushed to.
The easiest way to setup Graphite is docker.
To display metrics that are stored in Graphite, you may use Grafana. You may also run it
using docker.
You may find example Grafana board (in form of JSON
file to import to Grafana) that displays Knot.x metrics
in misc/example-grafana-board.json
file in this repo.
Currently metrics-sender
module enables sending ootb Vert.x metrics to Graphite. More metrics stores will be added in the future.
Also there will be a dedicated board that will enable live preview on Knot.x instance health.