远程主机上 nginx 后面带有 Pyrscope 的 Grafana:不允许 405

问题描述 投票:0回答:1

设置:

主持人A: 位于 localhost:4040 的 Pyrscope 位于 nginx-reverse-proxy 后面,并在 nginx.conf 中包含以下部分:

    location /pyroscope {
        proxy_pass http://localhost:4040;

        # dav_methods  PUT;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

主持人B: grafana-server 应该向 Pyrscope 发送请求

问题

我错过了什么或做错了什么,或者我可以进一步测试什么?我很困惑,因为用 curl 进行测试似乎有效......

我尝试添加数据源,结果如下:

来自用户界面

我正在尝试将 Pyrscope 作为数据源添加到 grafana 中,但如果我单击“保存并测试”,它将返回:

http://ip/pyroscope
通过curl从命令行

405 not allowed


profiling grafana nginx-reverse-proxy
1个回答
0
投票

Grafana-UI,来源:

curl http://ip/pyroscope StatusCode : 200 StatusDescription : OK Content : <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width"/><meta name="theme-color" ... RawContent : HTTP/1.1 200 OK Connection: keep-alive Vary: Accept-Encoding Content-Length: 498 Content-Type: text/html Date: Wed, 17 Jan 2024 11:53:48 GMT Server: nginx/1.22.0 <!doctype html><html lang="en... Forms : {} Headers : {[Connection, keep-alive], [Vary, Accept-Encoding], [Content-Length, 498], [Content-Type, text/html]...} Images : {} InputFields : {} Links : {} ParsedHtml : mshtml.HTMLDocumentClass RawContentLength : 498

尽管我很困惑为什么我得到了 http-405,但它可以工作。

© www.soinside.com 2019 - 2024. All rights reserved.