Monitoring
Last updated
Last updated
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 here for the lists of counter metrics. For details node by node observability, we recommend using Analytic.
Prometheus is an open-source monitoring and alerting solution.
Before setting up Prometheus, configure the following env variables in Flowise:
After Prometheus is installed, run it using a configuration file. Flowise provides a default configuration file that can be found here.
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.
By default, /api/v1/metrics
is available for Prometheus to pull the metrics from.
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 guide.
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:
grafana.dashboard.app.json.txt: API metrics such as number of chatflows/agentflows, predictions count, tools, assistant, upserted vectors, etc.
grafana.dashboard.server.json.txt: metrics of the Flowise node.js instance such as heap, CPU, RAM usage
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 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 file which can be used to start the collector container.
The collector will be using the otel.config.yml file under the same directory for configurations. Currently only Datadog and Prometheus are supported, refer to the Open Telemetry 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.