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_metrics{Failed="0"}) by (ApplicationName)
Total number of flows that failed per app count(flogo_flow_metrics{Failed!="0"}) by (ApplicationName)
Total number of flows that executed successfully across all apps

(when you are collecting metrics for multiple apps)

count(flogo_flow_metrics{Failed="0"})
Total number of flows that failed across all apps

(when you are collecting metrics for multiple apps)

count(flogo_flow_metrics{Failed!="0"}
Total time taken by flows which got executed successfully sum(flogo_flow_metrics{Failed="0"}) by (ApplicationName, FlowName)
Total time taken by flows which failed sum(flogo_flow_metrics{Failed!="0"}) 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_metrics{Failed="0"}) by (ApplicationName, FlowName)
Minimum time taken by flows which failed min(flogo_flow_metrics{Failed!="0"}) by (ApplicationName, FlowName)
Maximum time taken by flows which executed successfully max(flogo_flow_metrics{Failed="0"}) by (ApplicationName, FlowName)
Maximum time taken by flows which failed max(flogo_flow_metrics{Failed!="0"}) by (ApplicationName, FlowName)
Average time taken by flows which executed successfully avg(flogo_flow_metrics{Failed="0"}) by (ApplicationName, FlowName)
Average time taken by flows which failed avg(flogo_flow_metrics{Failed!="0"}) 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_metrics{Failed="0"}) by (ApplicationName,FlowName)
Total number of activities that failed per flow and app count(flogo_activity_metrics{Failed!="0"}) by (ApplicationName,FlowName)
Total number of activities that executed successfully across all apps

(when you are collecting metrics for multiple apps)

count(flogo_activity_metrics{Failed="0"})
Total number of activities that failed across all apps

(when you are collecting metrics for multiple apps)

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