Observability
This section we will show you how to configure the application observability; logging and metrics.
Configure logging
You can configure the log level of your application at installation time using the values below.
kdb Insights Enterprise uses log components as a way to identify the origin of a log message.
The routings
object allows you to set the log level for different components
with DEFAULT
applying to anything that's not set explicitly.
global:
logging:
routings:
DEFAULT: INFO
InfoService: DEBUG
The example above sets all components to INFO
with the exception of the InfoService
component, which is set to DEBUG
.
Configure metrics
kdb Insights Enterprise generates metrics to allow you to quickly identify the system performance and potential issues. This allows you to monitor data flows, component errors, and a variety of other metrics.
kdb Insights Enterprise metrics are disabled by default since the application does not deploy with the Prometheus stack. You can enable metrics using the install values below.
global:
metrics:
enabled: true
serviceMonitor:
enabled: true
interval: 30s
additionalLabels:
release: kx-prom
Set global.metrics.enabled
to true
to enable metrics.
There are two methods of enabling Prometheus scraping;
- Prometheus ServiceMonitors
- pod annotations
ServiceMonitors
The global.metrics.serviceMonitor
object configures the use of Prometheus
ServiceMonitor object within the application. With this mode enabled,
the application will create a set of ServiceMonitor resources which
Prometheus uses to scrape metrics.
Variable | Type | Example | Default |
---|---|---|---|
global.metrics.serviceMonitor.enabled |
bool |
true |
false |
global.metrics.serviceMonitor.interval |
int |
30s |
10s |
global.metrics.serviceMonitor.additionalLabels.release |
string |
kx-prom |
"" |
enabled
- enables the ServiceMonitor modeinterval
- metrics polling intervaladditionalLabels.release
- this is a label to match your Prometheus deployment name.
Pod annotations
The other method of enabling metrics is to use pod annotations instead of using ServiceMonitors. This is useful in situations where the Prometheus operator cannot be used, or another approach is preferred.
The values file below shows the required configuration.
global:
metrics:
enabled: true
useAnnotations: true
serviceMonitor:
enabled: false
Setting global.metrics.useAnnotations
to true
will add Prometheus annotations to the
application pods. These annotations will be prefixed with prometheus.io
.