Skip to main content

ADX Cumulio Plugin

The ADX Cumulio Plugin is a Java application running in IoT Data Engine that is a bridge between Azure Data Explorer (ADX) and Luzmo (Cumul.io). When user is loading the Luzmo dashboard, the plugin is called by Luzmo in order to fetch the data from ADX. For details about endpoints and payloads please check the Luzmo documentation. Plugin is converting the JSON payload to a KQL query that is accepted by ADX Cluster. The plugin in order to verify incoming requests is using secret value passed in the X-Secret header. This value is provided by Luzmo when creating a new plugin in the portal.

Database connection

The plugin when deployed in Azure is using Managed System Identity to connect to the ADX.

Local development

When working locally, it's impossible to use MSI, therefore plugin is connecting using token authentication. In order to connect to ADX, the plugin needs to have a valid token. The token can be generated using the following command:

1. az login
2. az account get-access-token --output json --resource https://management.core.windows.net

Obtained token needs to be assigned to a token in the ApplicationContext.java file.

Query building

The plugin on every request from Luzmo is generating a string value which is KQL query. It's preparing each part of query separately and then concatenating them together. Such as:

  • Where part -> prefixed with | where
  • Group by part -> prefixed with | summarize appended based on Aggregation part and count() by key words
  • Select part -> prefixed with | project

If query is not pushdown enabled, plugin will limit the results to 100 000 rows -> | limit 100000

Datetime fields and timezones

In Luzmo it's possible to set up a timezone for a dataset. As well as define on dashboard if timezone should be aligned with the browser timezone. In our datasets there are columns which are both local (e.g. ingestionTimeStamp, localStartTime) and UTC timezones (utcStartTime). Luzmo can correct the timezone itself, but only if it can read the time, therefore when the level value on aggregated datetime column is set to hour, minute, second and millisecond. On the other hand if level is set to year, quarter (not supported), month, week or day it's plugin that has to correct the timezone.