Configurations in the Flogo App’s YAML File
To register an app with the Flogo Enterprise Monitoring app, provide the following configuration details in the app's YAML file.
- Labels: The deployment must have a label with the same value provided in the
FLOGO_APP_SELECTORenvironment variable. For example, ifFLOGO_APP_SELECTORhas the value asappType=flogo, the Flogo app must have a label with the key asappTypeand Name asflogo. The Flogo Enterprise Monitoring app attempts to register the app with this label only. If the label is not provided, the app is ignored. - Annotations: The following annotations are mandatory:
- app.tibco.com/metrics: Setting this annotation to
trueregisters the app with the Flogo Enterprise Monitoring app and enables the metrics collection on the app. Setting the annotation tofalsederegisters it from the Flogo Enterprise Monitoring app and turns off the metrics collection. - app.tibco.com/metrics-port: Provide the HTTP port for the app. This port must be the same as the one specified by the
FLOGO_HTTP_SERVICE_PORTenvironment variable. If an invalid value is set, the app is ignored.
- app.tibco.com/metrics: Setting this annotation to
Sample YAML File
Application
apiVersion: v1
kind: Service
metadata:
name: flogoapp
labels:
app: flogoapp
spec:
type: LoadBalancer
ports:
- port: 9999
protocol: TCP
name: appport
targetPort: 9999
selector:
app: flogoapp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: flogoapp
spec:
selector:
matchLabels:
app: flogoapp
replicas: 2
template:
metadata:
labels:
app: flogoapp
appType: flogo
annotations:
app.tibco.com/metrics: 'true'
app.tibco.com/metrics-port: '7777'
spec:
containers:
- name: flogoapp
image: flogoapp:v1
imagePullPolicy: Never
ports:
- containerPort: 9999
- containerPort: 7777
env:
- name: "FLOGO_HTTP_SERVICE_PORT"
value: "7777"