Analytics

Analytics can be enabled on Horizon to speed search and dashboards on certificates, events and discovery events. It will create an embedded analytics database on the filesystem on each of the Horizon nodes to store a copy of those objects.

This will increase RAM and CPU consumption on the Horizon server itself, but will reduce load on the database. You should consider enabling the analytics if you have slow interfaces due to a large number of certificates or events

The analytics database is only used for research; all other operations are done directly to the mongo database

Configuring the analytics

Analytics is an opt-in feature that can be enabled through configuration:

  • RPM

  • Kubernetes

  • Docker

Follow the Advanced configuration guide to add the following key to set up the analytics database file:

horizon.analytics.url = "jdbc:duckdb:/opt/horizon/var/analytics.db"

The following configuration keys are used to enable the analytics on certificate, event and/or discovery event.

horizon.event.analytics.enabled = true
horizon.discovery.event.analytics.enabled = true
horizon.certificate.analytics.enabled = true

The following configuration keys are additional parameters for advanced configuration:

horizon.analytics.pool-size = 10
horizon.analytics.memory-limit = "1GB"

While the analytics data store on disk is not critical for the core application functionality, we recommend enabling data persistence to reduce synchronization overhead. When persistence is enabled in the Helm chart, Horizon will be deployed as a StatefulSet instead of a standard Deployment.

This configuration utilizes a Persistent Volume Claim (PVC) to ensure reliable storage and retention of analytics data across pod restarts and rescheduling.

analytics:
  enabled: true

updateStrategy:
  type: RollingUpdate

persistence:
  enabled: true
  volumeClaimTemplates:
    analytics:
      storageClass: <YOUR-CLUSTER-STORAGE-CLASS>
      size: "1Gi"
Updating the application with a StatefulSet will require additional considerations.

Environnement variables are available to configure the analytics see the docker analytics parameters.