- Install and configure a Prometheus docker container:
- Pull docker image of Prometheus from docker with the command: docker pull prom/prometheus
- Save the attached prometheus.yml file to on your machine and then open the file in an editor to update the Polyspace Access URL and protocol (http or https) fields to match the values of your Polyspace Access installation. The default protocol is http.
- Start the prometheus docker container to collect Polyspace Access data:docker run -d --name ps-prometheus --mount type=bind,source=/local/Access/Grafana/etc/prometheus.yml,destination=/etc/prometheus/prometheus.yml -p 9090:9090 prom/PrometheusWhen you run the command, replace /local/Access/Grafana/etc/ with the path of the folder where you saved the file prometheus.yml.
- Install and configure a Grafana docker container:
- Pull docker image of Grafana from docker with the command: docker pull grafana/grafana
- Start grafana docker container on port 3000 with command: docker run -d --name=grafana -p 3000:3000 grafana/Grafana
- Open Grafana in your web browser using the URL that corresponds to the hostname and port of the machine where you started the Grafana docker container. For example, http://my-example-server:3000. The first time you login, use “admin” as both the username and password.
- Import the Grafana dashboard template and attach a data source:
- Import the attached Polyspace_Access_Grafana_Simple_Dashboard.json file template to your Grafana server. See Import Dashboards.
- Attach the collected Polyspace Access metrics to the Grafana dashboard using a Prometheus data source. See data sources.
How do I install Prometheus and Grafana to monitor Polyspace Access performance metrics?
6 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2024-4-11
编辑: MathWorks Support Team
2025-12-11,8:08
I aim to track various performance indicators for Polyspace Access, including the database size, the number of users connected, and the number of uploads.
采纳的回答
MathWorks Support Team
about 22 hours 前
编辑:MathWorks Support Team
about 14 hours 前
Starting in R2024a, you can extract Polyspace Access performance metrics via a new API endpoint and use those metrics to monitor the health of the Polyspace Access server. For more information, see: https://www.mathworks.com/help/polyspace_access/install/monitor-polyspace-access-performance.html
The following example illustrates how to configure a Prometheus® data source and Grafana® dashboard to monitor the metrics that you extract from Polyspace Access. The configuration assumes that Polyspace Access is installed on a machine with hostname my-example-server, and that you run the commands below from that machine with the appropriate user privileges (for example, sudo).
Once you complete the configuration, you should have a dashboard similar to the attached picture polyspace-grafana.png.
Note that you can further customize the dashboard, for example by modifying the granularity of the monitoring periods or by setting up alerts when a metrics exceeds a specific threshold. To customize the dashboard, see Panels and visualizations.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!