Elasticsearch plugin
Monitor any metrics from your Elasticsearch environment using custom QueryDSL, Lucene queries and API calls.
How to add the Elasticsearch plugin
In SquaredUp browse to Settings > Plugins > Add plugin and search for the plugin.
Select the Elasticsearch plugin.
Enter a display name for your new plugin.
Enter the Instance URL for your Elasticsearch environment.
Where to find the Instance URL
The URL depends on your Elasticsearch environment:
If you are using the Elastic cloud service, you need to enter the endpoint URL, which has the following format:
https://CLUSTER_ID.REGION.CLOUD_PLATFORM.DOMAIN:PORT
If you are running Elasticsearch in a different environment, ask your Elastic administrator for the instance URL and port number.
Enter the username and password for your Elasticsearch environment.
Leave the checkbox for Automatically create a workspace ticked, this will create a new workspace for this plugin containing out of the box dashboards and scopes.
Tip: Each index in Elasticsearch will be its own object in SquaredUp, which means you can scope tiles to one or more indices.
Optionally, select whether you would like to restrict access to this plugin instance. By default, restricted access is set to off.
Restrict access to this plugin?
The term plugin here really means plugin instance. For example, a user may configure two instances of the AWS plugin, one for their development environment and one for production. In that case, each plugin instance has its own access control settings.
By default, Restrict access to this plugin? is set to off. The plugin can be viewed, edited and administered by anyone. If you would like to control who has access to this plugin, switch Restrict access to this plugin? to on.
Use the Restrict access to this plugin? dropdown to control who has access to the workspace:
By default, the user setting the permissions for the plugin will be given Full Control and the Everyone group will be given Link to workspace permissions.
Tailor access to the plugin, as required, by selecting individual users or user groups from the dropdown and giving them Link to workspace or Full Control permissions.
If the user is not available from the dropdown, you are able to invite them to the plugin by typing in their email address and then clicking Add. The new user will then receive an email inviting them to create an account on SquaredUp Cloud. Once the account has been created, they will gain access to the tenant.
At least one user or group must be given Full Control.
Admin users can edit the configuration, modify the Access Control List (ACL) and delete the plugin, regardless of the ACL chosen.
Plugin access levels
Access Level:
Link to workspace
- User can link the plugin to any workspace they have at least Editor permissions for.
- Data from the plugin can then be viewed by anyone with any access to the workspace.
User can share the plugin data with anyone they want.
User cannot configure the plugin in any way, or delete it.
Full Control - User can change the plugin configuration, ACL, and delete the plugin.
See Access control for more information.
Click Save. The Elasticsearch plugin is now added. To be able to use it, you need to create a custom Data Stream for this plugin.
Using the Elasticsearch plugin
Data Streams

A data stream brings you data to answer a specific question like "What's the health state of the objects?", "What kind of alerts are coming from this plugin for my servers?", "What's the average memory usage of this app?"
The magic of data streams is that they standardize data from all the different shapes and formats your tools use into a straightforward tabular format. While creating a tile you can tweak data streams by grouping or aggregating specific columns. Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
There are three types of data streams available for this plugin
Data streams installed with the plugin
Configurable data streams see Using Configurable data streams with the Elasticsearch plugin
Custom data streams, see How to create a custom Data Stream for the Elasticsearch plugin
Using Configurable data streams with the Elasticsearch plugin

A configurable data stream allows you to easily create new data streams specific to your needs, by entering information into a form, such as metric names or queries. Configurable data streams have a + before the name, and once new data streams have been created they show in the normal list of data streams.
Any data streams you create can be edited from Settings > Data Streams.
Query
Scope to an object from any plugin
Select + Query from the data stream list
Enter a Display Name for the new data stream
The next two fields, JSON Query Body and JSON Query Parameters, are both optional, but you must enter details for either one or the other.
Optionally, enter a JSON Query Body, for example:
Copy{
"query": {
"query_string": {
"query": "managedEntityDisplayName:\"Microsoft Windows Server 2016 Datacenter\""
}
}
}Optionally, enter a set of JSON Query Parameters, for example:
Copy{
"q": "managedEntityDisplayName:\"Microsoft Windows Server 2016 Datacenter\""
}

A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g {{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.
For example, if objects of type "host" have a property called name
, you can use {{name}}
. This will resolve {{name}}
to the value of the name property of the different "host" objects used in the scope.

A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g {{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.
For example, if objects of type "host" have a property called name
, you can use {{name}}
. This will resolve {{name}}
to the value of the name property of the different "host" objects used in the scope.
Lucene Query
Scope to an object from any plugin
Select + Lucene Query from the data stream list
Enter a Display Name for the new data stream
Enter a Lucene Query, for example:
CopymanagedEntityDisplayName:"Microsoft Windows Server 2016 Datacenter"
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.For example, if objects of type "host" have a property called
name
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.
Custom API Call
Scope to an object from any plugin
Select + Custom API Call from the data stream list
Enter a Display Name for the new data stream
Select an HTTP Method to use for the API call
The next three fields, Elasticsearch API Endpoint, JSON Headers and JSON Parameters, are all optional, but you must enter details for at least one.
Enter an Elasticsearch API Endpoint, for example:
{{name}}/_search
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.For example, if objects of type "host" have a property called
name
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.Optionally, enter a set of JSON Headers
Optionally, enter a set of JSON Parameters
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.For example, if objects of type "host" have a property called
name
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.Optionally, enter a JSON Body
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.For example, if objects of type "host" have a property called
name
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.
How to create a custom Data Stream for the Elasticsearch plugin
Go to Settings > Data Streams.
Click Add new Data Stream.
Enter a display name for your Data Stream.
Note: The display name is the name that you use to identify your Data Stream in SquaredUp. It has no technical impact and doesn't need to be referenced in the Data Stream's code.
Choose the plugin this Data Stream is for.
After you've chosen the plugin a new field Data Source appears.
Data source and code:
To find out which data source to select and get code examples for the Code field, see the help below.
Click Save to save your Data Stream.
Note:
You can use mustache parameters in your data stream. You can use them in your query as well as anywhere else in the data stream code (for example, to call an API endpoint depending on an object's name).

A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g {{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.
For example, if objects of type "host" have a property called name
, you can use {{name}}
. This will resolve {{name}}
to the value of the name property of the different "host" objects used in the scope.
Example 1: Using Query DSL syntax for your query
Which data source do I have to select from the dropdown?
Query
Code example:
{
"name": "customQuery",
"dataSourceConfig": {
"queryBody": {
"query": {
"query_string": {
"query": "managedEntityDisplayName:\"Microsoft Windows Server 2016 Datacenter\""
}
}
},
"queryParams": {}
},
"rowPath": [
"hits",
"hits"
],
"matches": "all",
"metadata": [
{
"name": "hits.hits._index",
"displayName": "Index"
},
{
"name": "hits.hits._source.managedEntityDisplayName",
"displayName": "Entity Name"
},
{
"name": "hits.hits._source.counter",
"displayName": "Metric"
},
{
"name": "hits.hits._source.value",
"displayName": "Value"
},
{
"name": "hits.hits._source.timestamp",
"displayName": "Timestamp",
"shape": "date"
}
]
}
Parameters:
| Mandatory | The internal name of the Data Stream. Can be used the refer to this Data Stream in a tile's JSON instead of using the Data Stream's internal ID. |
queryBody | Mandatory | Insert your Query DSL here. Your query needs to replace lines 5 to 9 in the code example above. |
rowPath | Mandatory | Depends on the data returned from your query. Enter the path to the row you want to use (the row path in the code example above is hits.hits). |
metadata | Mandatory | Depends on the data returned from your query. Use the code example above as a template for the columns you want to return. |
metadata
Parameter
Optional, but recommended
The metadata
parameters are used to describe columns in order to tell SquaredUp what to do with them. You can do multiple things with the metadata
parameters:
Specify how SquaredUp should interpret the columns you return and - to an extent - how their content displayed. You do this by giving each column a shape.
The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link.
Filter out or just hide columns.
Only the columns you define in
metadata
will be returned in the results. This helps you to filter out columns you don't need. If you need the content of a column but don't want to display it, you can use thevisible
parameter.Give columns a nicely readable display name.
Assign a specific role to columns
The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role
value
to the column that contains the actual value you want to use in your visualization.
Note: If you don't specify any metadata, all columns will be returned and SquaredUp will do its best to determine which columns should be used for which purpose. If you're returning pretty simple data, for example just a string and a number, this can work fine. But if you're returning two columns with numbers it gets trickier for SquaredUp to figure out which one is the value and which one is just an ID or some other number.
Parameters:
Tip: Before you start specifying metadata, leave them empty at first and get all the raw data with your new data stream once. In order to do this, finish creating your custom data stream without metadata and create a tile with this data stream. The Table visualization will show you all raw data.
This will give you an overview about all columns and their content and help you decide which columns you need and what their shapes and roles should be. It's also essential for getting the correct column name to reference in the name
parameter.
Use this information to go back to the data stream configuration and specifying the metadata.
name | Mandatory | Enter the name of the column you are referencing here. To find the name of a column, get the data from this data stream once without any metadata. See the tip above for how to do that. You'll see the column name when you hover over the column in the Table. |
displayName | Optional | Here you can give the column a user-friendly name for the UI |
shape | Recommended | The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link. Note: Please refer to the list of shapes below this table to see available shapes. |
role | Recommended | The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role Note: Please refer to the list of roles below this table to see available roles. |
visible | Optional |
Use this if you need a columns content but don't need to display the column itself. Example: Column A contains the full link to a ticket in your ticket system. Column B contains the ticket ID. You want to use the ticket ID as a label for the link, turning the long URL into a much nicer to read "Ticket 123". This is why you need the content of column B, to assign it as a label for column A. But since the URL is now displayed as the ticket ID, it would be redundant to still display column B. This is why you hide column B with |

There are many different shapes you can use for your columns and the list of possible shapes gets expanded constantly:
Basic types, like:
boolean
,date
,number
,string
Currency types that get displayed with two decimal values and their currency symbol (for example $23,45), like:
currency
(generic currency),eur
,gbp
,usd
Data types, like:
bytes
,kilobytes
,megabytes
Time types, like:
seconds
,milliseconds
,timespan
The status type :
state
Utility types, like:
customUnit
url
(will be displayed as a link)
Tip:
Some shapes can be configured.
If a shape is configurable, you can edit how the shape displays data in the UI.

label | A column containing user-friendly names. Line Graphs use this role to group data into series. so each label will get its own line in the Line Graph. |
link | A column containing a link that can be used as a drilldown in Status Blocks. |
timestamp | A column containing a date to use on the X -axis of a Line Graph. |
unitLabel | A column containing user-friendly labels for data series, e.g. ‘Duration’. Line Graphs can use this role to label the Y-axis. |
value | A column containing the numeric value you want to use in your visualization. |
Example 2: Using Lucene syntax for your query
Which data source do I have to select from the dropdown?
Query
Code example:
{
"name": "luceneQuery",
"dataSourceConfig": {
"queryBody": {},
"queryParams": {
"q": "managedEntityDisplayName:\"Microsoft Windows Server 2016 Datacenter\""
}
},
"rowPath": [
"hits",
"hits"
],
"matches": "all",
"metadata": [
{
"name": "hits.hits._index",
"displayName": "Index"
},
{
"name": "hits.hits._source.managedEntityDisplayName",
"displayName": "Entity Name"
},
{
"name": "hits.hits._source.counter",
"displayName": "Metric"
},
{
"name": "hits.hits._source.value",
"displayName": "Value"
},
{
"name": "hits.hits._source.timestamp",
"displayName": "Timestamp",
"shape": "date"
}
]
}
Parameters:
| Mandatory | The internal name of the Data Stream. Can be used the refer to this Data Stream in a tile's JSON instead of using the Data Stream's internal ID. |
q | Mandatory | Insert your Lucene query here (line 6 in the code example above). |
rowPath | Mandatory | Depends on the data returned from your query. Enter the path to the row you want to use (the row path in the code example above is hits.hits). |
metadata | Mandatory | Depends on the data returned from your query. Use the code example above as a template for the columns you want to return. |
metadata
Parameter
Optional, but recommended
The metadata
parameters are used to describe columns in order to tell SquaredUp what to do with them. You can do multiple things with the metadata
parameters:
Specify how SquaredUp should interpret the columns you return and - to an extent - how their content displayed. You do this by giving each column a shape.
The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link.
Filter out or just hide columns.
Only the columns you define in
metadata
will be returned in the results. This helps you to filter out columns you don't need. If you need the content of a column but don't want to display it, you can use thevisible
parameter.Give columns a nicely readable display name.
Assign a specific role to columns
The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role
value
to the column that contains the actual value you want to use in your visualization.
Note: If you don't specify any metadata, all columns will be returned and SquaredUp will do its best to determine which columns should be used for which purpose. If you're returning pretty simple data, for example just a string and a number, this can work fine. But if you're returning two columns with numbers it gets trickier for SquaredUp to figure out which one is the value and which one is just an ID or some other number.
Parameters:
Tip: Before you start specifying metadata, leave them empty at first and get all the raw data with your new data stream once. In order to do this, finish creating your custom data stream without metadata and create a tile with this data stream. The Table visualization will show you all raw data.
This will give you an overview about all columns and their content and help you decide which columns you need and what their shapes and roles should be. It's also essential for getting the correct column name to reference in the name
parameter.
Use this information to go back to the data stream configuration and specifying the metadata.
name | Mandatory | Enter the name of the column you are referencing here. To find the name of a column, get the data from this data stream once without any metadata. See the tip above for how to do that. You'll see the column name when you hover over the column in the Table. |
displayName | Optional | Here you can give the column a user-friendly name for the UI |
shape | Recommended | The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link. Note: Please refer to the list of shapes below this table to see available shapes. |
role | Recommended | The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role Note: Please refer to the list of roles below this table to see available roles. |
visible | Optional |
Use this if you need a columns content but don't need to display the column itself. Example: Column A contains the full link to a ticket in your ticket system. Column B contains the ticket ID. You want to use the ticket ID as a label for the link, turning the long URL into a much nicer to read "Ticket 123". This is why you need the content of column B, to assign it as a label for column A. But since the URL is now displayed as the ticket ID, it would be redundant to still display column B. This is why you hide column B with |

There are many different shapes you can use for your columns and the list of possible shapes gets expanded constantly:
Basic types, like:
boolean
,date
,number
,string
Currency types that get displayed with two decimal values and their currency symbol (for example $23,45), like:
currency
(generic currency),eur
,gbp
,usd
Data types, like:
bytes
,kilobytes
,megabytes
Time types, like:
seconds
,milliseconds
,timespan
The status type :
state
Utility types, like:
customUnit
url
(will be displayed as a link)
Tip:
Some shapes can be configured.
If a shape is configurable, you can edit how the shape displays data in the UI.

label | A column containing user-friendly names. Line Graphs use this role to group data into series. so each label will get its own line in the Line Graph. |
link | A column containing a link that can be used as a drilldown in Status Blocks. |
timestamp | A column containing a date to use on the X -axis of a Line Graph. |
unitLabel | A column containing user-friendly labels for data series, e.g. ‘Duration’. Line Graphs can use this role to label the Y-axis. |
value | A column containing the numeric value you want to use in your visualization. |
Example 3: Using any API endpoint with a custom call
Which data source do I have to select from the dropdown?
Custom API Call
Code example:
{
"name": "customApiCall",
"dataSourceConfig": {
"method": "POST",
"endpoint": "{{name}}/_search",
"headers": {},
"params": {},
"body": {
"query": {
"query_string": {
"query": "managedEntityDisplayName:\"Microsoft Windows Server 2016 Datacenter\""
}
}
}
},
"rowPath": [
"hits",
"hits"
],
"matches": "all",
"metadata": []
}
Parameters:
| Mandatory | The internal name of the Data Stream. Can be used the refer to this Data Stream in a tile's JSON instead of using the Data Stream's internal ID. |
method | Mandatory | Enter the method (POST or GET) |
endpoint | Mandatory | Enter the API endpoint you want to call. |
headers , params | Optional | Here you can add headers and parameters to your API call. |
body | Mandatory or optional | Mandatory when you are using a POST |
rowPath | Mandatory | Depends on the data returned from your query. Enter the path to the row you want to use (the row path in the code example above is hits.hits). |
metadata | Mandatory | Depends on the data returned from your query. |
metadata
Parameter
Optional, but recommended
The metadata
parameters are used to describe columns in order to tell SquaredUp what to do with them. You can do multiple things with the metadata
parameters:
Specify how SquaredUp should interpret the columns you return and - to an extent - how their content displayed. You do this by giving each column a shape.
The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link.
Filter out or just hide columns.
Only the columns you define in
metadata
will be returned in the results. This helps you to filter out columns you don't need. If you need the content of a column but don't want to display it, you can use thevisible
parameter.Give columns a nicely readable display name.
Assign a specific role to columns
The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role
value
to the column that contains the actual value you want to use in your visualization.
Note: If you don't specify any metadata, all columns will be returned and SquaredUp will do its best to determine which columns should be used for which purpose. If you're returning pretty simple data, for example just a string and a number, this can work fine. But if you're returning two columns with numbers it gets trickier for SquaredUp to figure out which one is the value and which one is just an ID or some other number.
Parameters:
Tip: Before you start specifying metadata, leave them empty at first and get all the raw data with your new data stream once. In order to do this, finish creating your custom data stream without metadata and create a tile with this data stream. The Table visualization will show you all raw data.
This will give you an overview about all columns and their content and help you decide which columns you need and what their shapes and roles should be. It's also essential for getting the correct column name to reference in the name
parameter.
Use this information to go back to the data stream configuration and specifying the metadata.
name | Mandatory | Enter the name of the column you are referencing here. To find the name of a column, get the data from this data stream once without any metadata. See the tip above for how to do that. You'll see the column name when you hover over the column in the Table. |
displayName | Optional | Here you can give the column a user-friendly name for the UI |
shape | Recommended | The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link. Note: Please refer to the list of shapes below this table to see available shapes. |
role | Recommended | The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role Note: Please refer to the list of roles below this table to see available roles. |
visible | Optional |
Use this if you need a columns content but don't need to display the column itself. Example: Column A contains the full link to a ticket in your ticket system. Column B contains the ticket ID. You want to use the ticket ID as a label for the link, turning the long URL into a much nicer to read "Ticket 123". This is why you need the content of column B, to assign it as a label for column A. But since the URL is now displayed as the ticket ID, it would be redundant to still display column B. This is why you hide column B with |

There are many different shapes you can use for your columns and the list of possible shapes gets expanded constantly:
Basic types, like:
boolean
,date
,number
,string
Currency types that get displayed with two decimal values and their currency symbol (for example $23,45), like:
currency
(generic currency),eur
,gbp
,usd
Data types, like:
bytes
,kilobytes
,megabytes
Time types, like:
seconds
,milliseconds
,timespan
The status type :
state
Utility types, like:
customUnit
url
(will be displayed as a link)
Tip:
Some shapes can be configured.
If a shape is configurable, you can edit how the shape displays data in the UI.

label | A column containing user-friendly names. Line Graphs use this role to group data into series. so each label will get its own line in the Line Graph. |
link | A column containing a link that can be used as a drilldown in Status Blocks. |
timestamp | A column containing a date to use on the X -axis of a Line Graph. |
unitLabel | A column containing user-friendly labels for data series, e.g. ‘Duration’. Line Graphs can use this role to label the Y-axis. |
value | A column containing the numeric value you want to use in your visualization. |
Comments
0 comments
Please sign in to leave a comment.