githubEdit

Monitoring

Flowise has native support for Prometheus with Grafana and OpenTelemetry. However, only high-level metrics such as API requests, counts of flows/predictions are tracked. Refer herearrow-up-right for the lists of counter metrics. For details node by node observability, we recommend using Analytic.

Prometheus

Prometheusarrow-up-right is an open-source monitoring and alerting solution.

Before setting up Prometheus, configure the following env variables in Flowise:

ENABLE_METRICS=true
METRICS_PROVIDER=prometheus
METRICS_INCLUDE_NODE_METRICS=true

Authentication Setup

The /api/v1/metrics endpoint requires API key authentication. You'll need to:

  1. Generate an API key following the instructions herearrow-up-right

  2. Save the API key to a file accessible by Prometheus (e.g., /etc/prometheus/api_key.txt)

  3. Configure Prometheus to use bearer token authentication

Prometheus Configuration

After Prometheus is installed, run it using a configuration file. Flowise provides a default configuration file that can be found herearrow-up-right.

You'll need to add authentication configuration to your Prometheus config file:

Remember to have Flowise instance also running. You can open browser and navigate to port 9090. From the dashboard, you should be able to see the metric endpoint - /api/v1/metrics is now live with authentication.

The /api/v1/metrics endpoint is available for Prometheus to pull metrics from, but requires API key authentication as configured above.

Grafana

Prometheus collects rich metrics and provides a powerful querying language; Grafana transforms metrics into meaningful visualizations.

Grafana can be installed in various ways. Refer to the guidearrow-up-right.

Grafana by default will expose port 9091:

On the left side bar, click Add new connection, and select Prometheus:

Since our Prometheus is serving at port 9090:

Scroll to the bottom and test the connection:

Take note of the data source ID shown in the toolbar, we'll need this for creating dashboards:

Now that connection is added successfully, we can start adding dashboard. From the left side bar, click Dashboards, and Create Dashboard.

Flowise provides 2 template dashboards:

If you are using templates above, find and replace all occurence of cds4j1ybfuhogb with the data source ID you created and saved earlier.

You can also choose to import first then edit the JSON later:

Now, try to perform some actions on the Flowise, you should be able to see the metrics displayed:

OpenTelemetry

OpenTelemetryarrow-up-right is an open source framework for creating and managing telemetry data. To enable OTel, configure the following env variables in Flowise:

Next, we need OpenTelemetry Collector to receive, process and export telemetry data. Flowise provides a docker compose filearrow-up-right which can be used to start the collector container.

The collector will be using the otel.config.ymlarrow-up-right file under the same directory for configurations. Currently only Datadogarrow-up-right and Prometheus are supported, refer to the Open Telemetryarrow-up-right documentation to configure different APM tools such as Zipkin, Jeager, New Relic, Splunk and others.

Make sure to replace with the necessary API key for the exporters within the yml file.

Last updated