- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在docker swarm中运行grafana和nginx,并将url /foobar/
代理到grafana的swarm实例。使用this guide,可以使用以下配置:
# nginx config
server {
resolver 127.0.0.11 valid=30s;
...
location /foobar/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://grafana:3000/;
proxy_next_upstream error timeout http_502;
}
}
# docker-compose
grafana:
image: ${REGISTRY}foo/grafana:${IMAGE_VERSION}
networks:
- foo
volumes:
- grafana:/var/lib/grafana
environment:
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/foobar/
proxy_pass
指令使用了一个变量,并将其更改为:
server {
resolver 127.0.0.11 valid=30s;
...
location /foobar/ {
set $grafana http://grafana:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass $grafana/;
# proxy_pass http://grafana:3000/;
proxy_next_upstream error timeout http_502;
}
}
GF_SERVER_ROUTER_LOGGING=true
),并且声称状态为
200 ok
,但是我在页面上唯一看到的是
If you're seeing this Grafana has failed to load its application files
1. This could be caused by your reverse proxy settings.
2. If you host grafana under subpath make sure your grafana.ini root_path setting includes subpath
3. If you have a local dev build make sure you build frontend using: npm run dev, npm run watch, or npm run build
4. Sometimes restarting grafana-server can help
最佳答案
使用变量时,完整URL是代理传递中的责任
location /foobar/ {
set $grafana http://grafana:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass $grafana$request_uri;
# proxy_pass http://grafana:3000/;
proxy_next_upstream error timeout http_502;
}
location ~ /foobar/(.*) {
set $grafana http://grafana:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass $grafana/$1;
proxy_next_upstream error timeout http_502;
}
关于docker - Grafana不适用于Nginx proxy_pass变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56745127/
有没有办法在grafana中舍入十进制值? round()和 ceil()函数获取“即时向量”,而不是数值,例如,添加类似 ceil(1/15) 的查询将返回 0 . 最佳答案 这取决于您用于显示数据
嗨,我想在grafana中创建一个简单的警报,以检查最近5分钟是否没有数据。 但我得到一个错误 警报查询中不支持模板变量 好吧,根据此issue模板在grafana中尚不支持。 我有两个问题: 模板是
我是 Grafana 的新开发人员,我想要一个查询,该查询返回名称末尾带有“CA”的变量。 我正在使用 SEARCH 键代码,但它似乎只返回包含的字符,而我对这些字符的位置非常感兴趣。 例如,我写了这
在 Grafana 中,可以使用外部数据库来保存配置。我使用 MySQL,问题是是否有任何选项可以配置 Grafana 中的最大内部数据库连接数? 最佳答案 可以在问题关闭时设置 max_conn:h
我正在尝试将来自 Prometheus 的内存使用数据聚合到 Grafana 中的表中,但我只想要最新的内存使用统计信息。目前,我不断重复使用同一服务的内存。 我试过减少时间范围,但这似乎没有影响。
我在 Server1 的 Grafana 托管中有 20 多个仪表板。我们购买了另一台服务器,并且确实在 Server2 机器上安装了相同版本的 Grafana。 我想知道是否可以将 Server-1
有没有办法让 Grafana 中的 Prometheus 计数器真正单调? 每当服务器重新启动时,我服务器上的计数器(使用 Prometheus Java 库)都会重置,并且 Grafana 中的计数
有没有办法在没有管理员登录的情况下将 Grafana 中的仪表板设置为主页?我有一个用于部署 Grafana 的 Helm 图表,因此我想在配置级别执行此操作。 我在 http://docs.graf
我正在使用 Grafana,我的 URL 字符串是这样的: http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi 我
我必须为 Grafana 创建一个插件。为此,我从 Github 克隆了代码并关注了 this .我已经设法构建了 grafana,但在运行服务器时遇到了问题。我收到错误 Grafana-server
在我的 Grafana 仪表板(以 Prometheus 作为数据源)中,我有一个自定义 $tier变量,它允许用户从下拉列表中选择层。它被定义为: Values separated by comma
我已经通过 Grafana 仪表板设置在 Grafana 仪表板中定义了一个变量 变量属于“自定义”类型。 我希望这个变量在仪表板打开时具有默认值。 如何设置默认值? 最佳答案 在仪表板中选择您的默认
我正在用 Grafana 表绘制数据图表,我想将一天中的所有数据点聚合到表中的一行中。正如您在下面看到的,我当前的设置是按每分钟显示值。 问题:如何制作显示按天聚合的值的 Grafana 表? |
是否可以在带有 prometheus 后端的 grafana 中确定数据集生命周期内记录的最高值,如果是,确定该值发生的时间? 例如,我正在使用 site_logged_in作为 Singlestat
我在 Grafana 中的图表每隔几秒钟就会自动更新一次。随着数据的进入,右侧的最后一个数据点会暂时下降。最终会显示正确的值,但在几次更新时该值较低。这是正常的吗?可以修复吗? 最佳答案 也许,这会有
我正在 Grafana 中寻找一个函数,它看起来应该是微不足道的,但直到现在我还无法找到它是如何实现的(如果有的话)。 使用最近的模板选项,我可以轻松创建仪表板一次,并快速更改显示的数据以查看数据的不
我在grafana中有一个视觉效果。我可以手动转到菜单单击导出并导出 json 中的时间序列数据。这很好用。有没有办法可以在 python 中编写脚本?是否有一些我可以点击的 api 会返回视觉对象的
我有一个新的数据源,我希望使用现有的仪表板。 我怎样才能改变它?有没有比导出/导入仪表板更快的方法? 最佳答案 指定一个变量并不能解决更改现有仪表板的数据源的所有问题 - 仍然会有一些元数据指向旧的,
尽管有这些设置,Grafana 仍然需要使用密码才能查看仪表板。有人可以帮我进行正确的设置吗? [auth.anonymous] # enable anonymous access enabled =
我正在尝试为每个 API 端点添加一个下拉列表,它将显示 http 请求的 QPS 和延迟(红色指标)。 我使用了 Grafana 的模板并使用了以下 prometheus 查询。 label_val
我是一名优秀的程序员,十分优秀!