Often-Used Queries

Prometheus uses the PromQL query language. This section lists some of the most commonly and often-used queries at the flow-level.

Flow-level Queries
To Get this Metric Use this Query
Total number of flows that got successfully executed per app count(flogo_flow_execution_count{State="Completed"}) by (ApplicationName, FlowName)
Total number of flows that failed per app count(flogo_flow_execution_count{State="Failed"}) by (ApplicationName, FlowName)
Total number of flows that executed successfully across all apps

(when you are collecting metrics for multiple apps)

count(flogo_flow_execution_count{State="Completed"})
Total number of flows that failed across all apps

(when you are collecting metrics for multiple apps)

count(flogo_flow_execution_count{State="Failed"})
Total time taken by flows which got executed successfully sum(flogo_flow_execution_duration_msec{State="Completed"}) by (ApplicationName, FlowName)
Total time taken by flows which failed sum(flogo_flow_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName)
Minimum time taken by the flows that got executed successfully

(what was the minimum time taken by a flow from amongst the flows that executed successfully)

min(flogo_flow_execution_duration_msec{State="Completed"}) by (ApplicationName)
Minimum time taken by flows which failed min(flogo_flow_execution_duration_msec{State="Failed"}) by (ApplicationName)
Maximum time taken by flows which executed successfully min(flogo_flow_execution_duration_msec{State="Completed"}) by (ApplicationName)
Maximum time taken by flows which failed max(flogo_flow_execution_duration_msec{State="Failed"}) by (ApplicationName)
Average time taken by flows which executed successfully avg(flogo_flow_execution_duration_msec{State="Completed"}) by (ApplicationName, FlowName)
Average time taken by flows which failed avg(flogo_flow_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName)
Activity-level Queries
To Get this Metric Use this Query
Total number of activities that got successfully executed per flow and app count(flogo_activity_execution_count{State="Completed"}) by (ApplicationName, FlowName,ActivityName)
Total number of activities that failed per flow and app count(flogo_activity_execution_count{State="Failed"}) by (ApplicationName, FlowName,ActivityName)
Total number of activities that executed successfully across all apps

(when you are collecting metrics for multiple apps)

count(flogo_activity_execution_count{State="Completed"})
Total number of activities that failed across all apps

(when you are collecting metrics for multiple apps)

count(flogo_activity_execution_count{State="Failed"})
Individual time taken by activities which got executed successfully per app and flow sum(flogo_activity_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName,ActivityName)
Individual time taken by activities which failed per app and flow sum(flogo_activity_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName,ActivityName)
Minimum time taken by the activity that got executed successfully within a given flow and app min(flogo_activity_execution_duration_msec{State="Completed"}) by (ApplicationName, FlowName,ActivityName)
Minimum time taken by a failed activity within a given flow and app min(flogo_activity_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName,ActivityName)
Maximum time taken by an activity which executed successfully within a given flow and app max(flogo_activity_execution_duration_msec{State="Completed"}) by (ApplicationName, FlowName,ActivityName)
Maximum time taken by an activity which failed within a given flow and app max(flogo_activity_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName,ActivityName)
Average time taken by an activity which executed successfully within a given flow and app avg(flogo_activity_execution_duration_msec{State="Completed"}) by (ApplicationName, FlowName,ActivityName)
Average time taken by an activity which failed within a given flow and app avg(flogo_activity_execution_duration_msec{State="Failed"}) by (ApplicationName, FlowName,ActivityName)