• 沒有找到結果。

Fields returned in the response

The following table describes the fields that can be returned in the response.

Flow

Name Description

app_name Name of the app

app_version Version of the app

flow_name Name of the flow

started Total number of times a given flow is started completed Total number of times a given flow is completed

Name Description

failed Total number of times a given flow has failed

avg_exec_time Average execution time of a given flow for successfully completed executions min_exec_time Minimum execution time for a given flow

max_exec_time Maximum execution time for a given flow

Activity

Name Description

app_name Name of the app

app_version Version of the app

flow_name Name of the flow

activity_name Name of the activity

started Total number of times a given activity is started completed Total number of times a given activity is completed failed Total number of times a given activity has failed

avg_exec_time Average execution time of a given activity for successfully completed executions

min_exec_time Minimum execution time for a given activity max_exec_time Maximum execution time for a given activity

Prometheus

TIBCO Cloud Integration - Flogo (PAYG) supports integration with Prometheus for app metrics monitoring. Prometheus is a monitoring tool which helps in analyzing the app metrics for flows and activities.

Prometheus servers scrape data from the HTTP /metrics endpoint of the apps.

Prometheus integrates with Grafana which provides better visual anlytics.

Flogo apps expose the following flow and activity metrics to Prometheus. These metrics are measured in milliseconds:

Labels Description

flogo_flow_execution_count: Total number of times the flow is started, completed, or failed ApplicationName Name of app

ApplicationVersion Version of app

Labels Description

FlowName Name of flow

State State of the flow. One of the following states:

Started

Completed

Failed

flogo_flow_duration_msec: Total time (in ms) taken by the flow for successful completion or failure

ApplicationName Name of app ApplicationVersion Version of app

FlowName Name of flow

State State of the flow. One of the following states:

Completed

Failed

flogo_activity_execution_count: Total number of times the activity is started, completed, or failed

ApplicationName Name of app ApplicationVersion Version of app

FlowName Name of flow

ActivityName Name of activity

State State of the activity. One of the following states:

Started

Completed

Failed

flogo_activity_execution_duration_msec: Total time (in ms) taken by the activity for successful completion or failure

ApplicationName Name of app ApplicationVersion Version of app

FlowName Name of flow

ActivityName Name of activity

Labels Description

State State of the activity. One of the following states:

Completed

Failed

Deprecated in TIBCO Cloud Integration - Flogo (PAYG) 2.10.0.

flogo_flow_metrics: Used for flow-level queries

ApplicationName Name of app ApplicationVersion Version of app

FlowName Name of flow

Started Total number of times flow is started Completed Total number of times flow is completed Failed Total number of times flow is failed

Deprecated in TIBCO Cloud Integration - Flogo (PAYG) 2.10.0.

flogo_activity_metrics: Used for activity-level queries

ApplicationName Name of app ApplicationVersion Version of app

FlowName Name of flow

ActivityName Name of Activity

Started Total number of times activity is started in given flow Completed Total number of times activity is completed in given flow Failed Total number of times activity is failed in given flow

For a list of some often-used flow-level queries, refer to the section, Often-Used Queries.

Using Prometheus to Analyze Flogo App Metrics

To enable Prometheus monitoring of Flogo apps, run the following:

FLOGO_HTTP_SERVICE_PORT=7779 FLOGO_APP_METRICS_PROMETHEUS=true ./<app-binary>

Setting FLOGO_APP_METRICS_PROMETHEUS variable to true enables Prometheus monitoring of Flogo apps.

The variable, FLOGO_HTTP_SERVICE_PORT, is used to set the port number on which the Prometheus endpoint is available.

Use the following endpoint URL in Prometheus server configuration: http://

for example, http:// 192.0.2.0:7779/metrics

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"})

Total time taken by flows which got

executed successfully sum(flogo_flow_execution_duration_msec{State="Compl eted"}) by (ApplicationName, FlowName)

Total time taken by flows which failed sum(flogo_flow_execution_duration_msec{State="Faile d"}) 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)

Activity-level Queries

To Get this Metric Use this Query Total number of activities that got

which failed per app and flow sum(flogo_activity_execution_duration_msec{State="F ailed"}) by (ApplicationName,

activity within a given flow and app min(flogo_activity_execution_duration_msec{State="F ailed"}) by (ApplicationName, which failed within a given flow and app which failed within a given flow and app

avg(flogo_activity_execution_duration_msec{State="F ailed"}) by (ApplicationName,

FlowName,ActivityName)