Registering a Flogo App with the Flogo Enterprise Monitoring App
After a Flogo app is registered with the Flogo Enterprise Monitoring app, the collection of instrumentation statistics starts automatically. To register a Flogo app with the Flogo Enterprise Monitoring app, start the app with the following properties:
FLOGO_HTTP_SERVICE_PORT=<instrumentation port>
: This property specifies the port required to enable the app instrumentation.FLOGO_APP_MON_SERVICE_CONFIG
: This property specifies details of the Flogo Enterprise Monitoring app to the Flogo app.FLOGO_APP_MON_SERVICE_CONFIG={\"host\":\"<Host of Flogo Enterprise Monitoring app>\",\"port\":\"<Port of Flogo Enterprise Monitoring app>\",\"tags\":[\"<Tag 1>\",\"<Tag 2>\"],\"apiKey\":\"<API Key>\"}
Option Description Host Host of the Flogo Enterprise Monitoring app. Port Port of the Flogo Enterprise Monitoring app. Tags (Optional) Custom tags that help you provide additional information about the Flogo app; you can set them specific to an app. For example, you can specify whether it is a REST app or whether it is running in Kubernetes, and so on. apiKey (Optional) For additional security, the Flogo Enterprise Monitoring app can also be started using a secret key called API key. The API key must be provided while starting the Flogo Enterprise Monitoring app and the same API key must also be provided while starting the Flogo app. The app registers with the Flogo Enterprise Monitoring app using the API key provided. If an API key is not provided, the app is not registered with the Flogo Enterprise Monitoring app.
Examples
- If the
Flogo Enterprise Monitoring app is running on
localhost
on port7337
and the app instrumentation port is7777
, start the Flogo app as:$FLOGO_HTTP_SERVICE_PORT=7777 FLOGO_APP_MON_SERVICE_CONFIG="{\"host\":\"localhost\",\"port\":\"7337\"}" ./App1
- If the
Flogo Enterprise Monitoring app is running on
localhost
on port7337
, the app instrumentation port is7777
, and you want to start the Flogo Enterprise Monitoring app based on an API Key APIkey1, start the app as:$FLOGO_HTTP_SERVICE_PORT=7777 FLOGO_APP_MON_SERVICE_CONFIG="{\"host\":\"localhost\",\"port\":\"7337\",\"apiKey\":\"<value specified when starting the Flogo Enterprise Monitoring app>\"}" ./app_linux_amd64
- If the
Flogo Enterprise Monitoring app is running on
localhost
on port7337
, the app instrumentation port is7777
, and you want to provide additional tags (namedonpremise
andtesting
), start the app as:$FLOGO_HTTP_SERVICE_PORT=7777 FLOGO_APP_MON_SERVICE_CONFIG="{\"host\":\"localhost\",\"port\":\"7337\",\"tags\":[\"onpremise\",\"testing\"]}" ./App1
- On Microsoft Windows, if the
Flogo Enterprise Monitoring app is running on
localhost
on port3000
and the app instrumentation port is7775
, start the app as:set FLOGO_HTTP_SERVICE_PORT=7775 set FLOGO_APP_MON_SERVICE_CONFIG={"host":"localhost","port":"3000","appHost":"instance1"} flogo-windows_amd64.exe
- On Linux and Mac, if the
Flogo Enterprise Monitoring app is running on
localhost
on port7337
, the app instrumentation port is7777
, start the app as:$FLOGO_HTTP_SERVICE_PORT=7777 FLOGO_APP_MON_SERVICE_CONFIG="{\"host\":\"localhost\",\"port\":\"7337\",\"apiKey\":\"<value specified when starting the Flogo Enterprise Monitoring app>\"}" ./app_linux_amd64
What to do next: View the statistics of the app on the UI of the Flogo Enterprise Monitoring app. See Viewing Statistics of Apps.