How to create a report
This page describes, how to create an Auto Trigger job from an existing query in the Calls view and run it. Use this guide when you want to set up automated reports or scheduled exports based on Elasticsearch queries.
Goal
Create and save an Auto Trigger entry whose configuration contains the desired query. The entry should have the correct output configuration (for example, transport includes email and transformation type is toCsv) and be runnable from the UI.
Step-by-step guide
-
Open the application root in your browser.
-
Navigate to the Calls section via the left navigation.
-
Change the time
range/filteringas needed to ensure the desired call event(s) are visible. -
Locate the query you want to use. Open the call row's Action dropdown and select the
Copy ES queryitem (it's always in the Action dropdown). The query will appear in a modal or textarea where it can be copied. -
Go to the Auto Trigger section via the left navigation.
-
Click Create New to start a new Auto Trigger entry. And navigate to the newly created entry's editor.
-
In the
editor, find the following fields and update them (use theCTRL+Spaceshortcut to get autocomplete suggestions):dataSource→ set toes-
parameters→ paste the query copied in step 4, the parts that were copied should be replaced into the[]section of theparametersobject. --> for example:{
"dataSource": "es",
"variableName": "ESVariable1",
"parameters": [
{},
{
"sort": [
{
"@timestamp": {
"order": "desc"
}
},
{
"attrs.type": {
"order": "asc"
}
}
],
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "attrs.type:call-end OR attrs.type:call-start OR attrs.type:call-attempt"
}
},
{
"range": {
"@timestamp": {
"gte": "now-1d/d",
"lte": "now"
}
}
}
]
}
}
}
]
}-
for the the
formatChannelthere could be multiple options, for example:toCsv→ if you want the output file to be in CSV format.toJson→ if you want the output file to be in JSON format
-
you can set multiple transformations, for example:
"formatChannel": [
{
"transformationType": "toJson",
"parameters": {}
},
{
"transformationType": "toCsv",
"parameters": {}
},
]transport→ set to the desired transport method, for example:email→ if you want to receive the report via email.webhook→ if you want to send the report to a webhook URL.
- you can set multiple transports, for example:
"transport": ["emailChannelId", "webhookChannelId"] -
-
-
Click Save and confirm the UI shows a success message and the entry appears in the list of entries.
-
Optionally, click Run Now (or similarly labeled button) for the entry and confirm the UI displays a started/completed status or shows the run in execution history.
After running the report
After the report has run, you can check the execution history for details about the run, including any generated files or outputs. Depending on your transport configuration, you may also receive the report via email or other methods specified in the transport settings.