Javascript 包含使用 prometheus 图形库所需的内容

Javascript includes required for using prometheus graph library

  1. 如果我必须在我的 Web 应用程序中使用 https://prometheus.io/docs/visualization/consoles/#graph-library 中描述的图形库,我应该包含哪些 JavaScript/CSS 文件?

  2. 我知道上面的图形库在 /api/v1/query_range 对 Prometheus 进行了 API 调用 - 有没有办法为此 URL 添加前缀,以便我可以通过服务器上我的应用端点代理它吗?

  3. 如何 "try out" /consoles/index.html.example 的控制台示例?如果我将其重命名为 /consoles/index.html,how/where 是否会在 prometheus 表达式浏览器应用程序中看到?

prom_console.jsprom_console.css

您需要设置一个名为 PATH_PREFIX 的变量,您可以使用它来执行此操作。

它将在 http://localhost:9090/consoles/index.html.example