Query Processor
A system task for executing queries across different systems, tailored for purposes like alert generation.
Conductor supports the ability to query the following sources:
- Conductor Search API
- This query type can be used for querying information from the Conductor Search API. It allows users to retrieve workflow-related data based on various parameters.
- Conductor Metrics (Prometheus)
- This query type facilitates querying Conductor Metrics using Prometheus. It enables users to gather and analyze performance metrics and system statistics.
Definitions
{
"name": "query_processor",
"taskReferenceName": "query_processor_ref",
"inputParameters": {
"queryType": "CONDUCTOR_API",
"statuses": "${workflow.input.statuses}",
"workflowNames": "${workflow.input.workflows}",
"startTimeFrom": "${workflow.input.fromStartedMinsFromNow}",
"startTimeTo": "${workflow.input.toStartedMinsFromNow}",
"correlationIds": "${workflow.input.correlationIds}",
"freeText": "${workflow.input.freeText}"
},
"type": "QUERY_PROCESSOR",
}
Input Parameters
Attributes | Description |
---|---|
queryType | Choose the query type. It can take the following values:
|
Depending on the chosen query method, the configuration parameters vary. If CONDUCTOR_API is chosen, then provide the following parameters:
Attributes | Description |
---|---|
workflowNames | Provide the workflow names for the query. |
correlationIds | Provide the correlation ID of the workflows to be queried. |
statuses | Provide the statuses of the workflows to be queried. |
startTimeFrom | Specify the time range for the query to be performed. |
startTimeTo | Specify the time range for the query to be performed. |
freeText | Specify the free text search parameter. |
If the query type is chosen as METRICS, then the task definition is as follows:
{
"name": "query_processor",
"taskReferenceName": "query_processor_ref",
"inputParameters": {
"metricsQuery": "",
"metricsStart": "",
"metricsEnd": "",
"metricsStep": "",
"queryType": "METRICS"
},
"type": "QUERY_PROCESSOR",
}
Attributes | Description |
---|---|
metricsQuery | Indicates the Prometheus query. |
metricsStart | Specifies the start time for the metrics query. |
metricsEnd | Specifies the end time for the metrics query. |
metricsStep | Defines a step or interval of the metrics query. |
Output Parameters
Attributes | Description |
---|---|
workflowsUrl | A link to the queried workflow executions in Conductor UI. |
Examples
- UI
- JSON Example
- Add task type Query Processor.
- Configure the query parameters.
{
"name": "query_processor",
"taskReferenceName": "query_processor_ref",
"inputParameters": {
"queryType": "CONDUCTOR_API",
"statuses": "${workflow.input.statuses}",
"workflowNames": "${workflow.input.workflows}",
"startTimeFrom": "${workflow.input.fromStartedMinsFromNow}",
"startTimeTo": "${workflow.input.toStartedMinsFromNow}",
"correlationIds": "${workflow.input.correlationIds}",
"freeText": "${workflow.input.freeText}"
},
"type": "QUERY_PROCESSOR",
}
Have a look at the workflow alerting example with OpsGenie for a detailed example of leveraging this task.