Skip to main content

Usage and Performance Metrics

The Xillio Link Redirector allows for the collection of usage and performance metrics. These metrics can be used to monitor the usage of the system and to monitor the health of the system. Currently the only supported metrics engine is InfluxDB. This is an open-source time series database that can be used to store and plot the metrics.

This guide will help you to setup the metrics collection and how to use the metrics to monitor the system. For more detailed information on how to install InfluxDB, please refer to the InfluxDB documentation.

Before we begin

As mentioned above, we will use InfluxDB to store the metrics. This means that you need to have an InfluxDB instance running. If you do not have an InfluxDB instance running, please refer to the InfluxDB documentation to install InfluxDB.

We will assume that you have an InfluxDB instance running on http://localhost:8086 and that you have created an organization called xlr, and a bucket called xlr.

Step 1. Configure the metrics

To configure the metrics, you need to add the following configuration to your config.yml file.

config.yml
metrics:
type: influx # The type of metrics engine to use, currently only influx is supported
url: http://localhost:8086 # The URL of the InfluxDB instance, should include authentication if enabled
organization: xlr # The organization to use in InfluxDB
bucket: xlr # The storage bucket to use in InfluxDB
precision: ms # Optional, the precision of the metrics, default is ms
performanceMonitoring: true # Optional, enable performance monitoring, default is false
flushInterval: 10000 # Optional, the interval in milliseconds to flush the metrics, default is 10000

Additionally we need to enable requestMonitoring in the config.yml file for our usage metrics to be collected. We can do this by adding the following configuration to the config.yml file:

config.yml
proxy:
# ... other configurations
requestMonitoring: true

Authentication

If you have configured authentication for your InfluxDB instance, you need to make sure that the Xillio Link Redirector can authenticate with the InfluxDB instance. This means that you can add the username and password, or the token to the configuration like this:

metrics:
url: http://{username}:{password}@localhost:8086

Or when using a token only (note that there is a colon before the token!):

metrics:
url: http://:{token}@localhost:8086

We need to restart the Xillio Link Redirector to apply the new configuration.

Step 3. Verify the metrics

At this stage we can verify that the metrics are being collected by visiting the InfluxDB UI. You can access the InfluxDB UI by visiting http://localhost:8086 in your browser. Login with your credentials and select the xlr organization and the xlr bucket, in the explorer tab. You should see a performance and requests measurement in the bucket.

If not, you can make some requests to the Xillio Link Redirector to generate some metrics, and wait a few seconds as the metrics are collected every 10 seconds by default. If after a few minutes you still do not see any metrics, please check the logs of the Xillio Link Redirector for any errors.

Step 3. Visualize the metrics

With these metrics being collected, you can now visualize them in the InfluxDB UI. You can create dashboards and alerts to monitor the usage and performance of the system. A default dashboard is available for download here.You can import this dashboard in the InfluxDB UI by clicking on the Dashboards tab and then on the Import button.