This article covers:
Navigate to the Datasets tab and click 'New dataset'. Select the 'ElasticSearch' connector. You'll be asked to provide a host, key and token:
After that you should see a list of indeces that are available in your cluster.
Please refer to the examples in our developer documentation to find out how to create a connection to Elasticsearch via our API.
Notes:
keyword or of the type text but have a subfield of the type keyword. More information on this can be found in the ElasticSearch docs.Once you have connected your ElasticSearch you can add datasets (indexes) as explained here. You can select one or multiple datasets (indeces) as available in your ElasticSearch and link them in Luzmo to ensure they can be used together in a dashboard. Also make sure to check out this article on Preparing your data for analytics.
Notes:
keyword or of the type text but have a subfield of the type keyword. More information on this can be found in the ElasticSearch docs.POST _aliases
{
"actions": [
{
"add": {
"index": "logs-*",
"alias": "logs"
}
}
]
}
To find out how to add datasets using our API, please refer to this example in our developer documentation.
When generating an Authorization token to grant a user acces to your embedded dashboards it is possible to override the data source properties in the authorization request to dynamically use different properties. Find out more about connection overrides.
The fields available for overriding a ElasticSearch connection are as follows:
Our developer documentation has more info about connection overrides and an example of a ElasticSearch connection override.
Example code demonstrating how to override a ElasticSearch connection:
import Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '<your Luzmo API key>',
api_token: '<your Luzmo API token>',
host: 'https://api.luzmo.com:443'
});
const response = await client.create('authorization',
{
type: "embed",
username: "< A unique and immutable identifier for your user >",
name: "< user name >",
email: "< user email >",
suborganization: "< a suborganization name >",
access: {
collections: [
{
id: "<collection_id>",
inheritRights: "use"
}
]
},
account_overrides: {
<your connection_id>: {
host: "<The new ElasticSearch host URL to connect to>",
key: "<username>",
token: "<password>"
}
}
}
);
| Data Type in Elasticsearch | Data Type in Luzmo |
|---|---|
| text | hierarchy |
| boolean | hierarchy |
| keyword | hierarchy |
| ip | hierarchy |
| object | hierarchy |
| nested | hierarchy |
| binary | hierarchy |
| short | numeric |
| integer | numeric |
| long | numeric |
| double | numeric |
| float | numeric |
| half_float | numeric |
| scaled_float | numeric |
| date | datetime |
| All Other Data Types | hierarchy |