sipcapture / homer7-docker

HOMER 7 Docker Images
93 stars 84 forks source link

Grafana connect: connection refused #114

Open TomSipacom opened 2 years ago

TomSipacom commented 2 years ago

Hello

First, TY for this project! I love docker and this is a great way to deploy Homer with Grafana under 5 sec!

My Grafana integration works when I directly browse to the Grafana dashboard, I got data in Grafana. However, I want to use the widgets in the Homer dashboard. But when I add it, I got the following error.

{"message":"remote http://grafana/ unreachable, could not forward: dial tcp X.X.X.X:80: connect: connection refused"}

This is a normal error because Grafana runs on port 3000 and not on port 80. Where can I adapt this? I prefer that I don't adapt it directly in the container.

Thanks!

georghimself commented 2 years ago

Same Problem here: {"message":"remote http://grafana/ unreachable, could not forward: dial tcp 172.19.0.2:80: connect: connection refused"}

allow_embedding is "true"

Did you find a solution?

lmangani commented 2 years ago

could not forward: dial tcp 172.19.0.2:80: connect: connection refused @georghimself that's a network issue, make sure the ports are correctly mapped

georghimself commented 2 years ago

@lmangani but how? grafana is listening on port 3000 not 80 shouldnt it just work with docker?

lmangani commented 2 years ago

What is configured in your homer-app config for the grafana integration? anonymyze as you see fit.

georghimself commented 2 years ago

@lmangani "host": "http://grafana:3000", "password": "xxxxxxxx", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "user": "admin"

lmangani commented 2 years ago

We are investigating and trying to replicate - updates will follow from @AlexeyOplachko

AlexeyOplachko commented 2 years ago

@georghimself hi, if possible can you please create a dashboard with only Grafana widget, reload page with Devtools open on Network tab and copy GET request to /dashboard/store(ping me if you need help with that). It should look something like this:

{
    "auth": "ok",
    "data": {
        "alias": "_1658477054693",
        "config": {
            "columns": 8,
            "grafanaProxy": false,
            "grafanaTimestamp": false,
            "ignoreMinSize": "warning",
            "maxrows": 6
        },
        "dashboardId": "_1658477054693",
        "id": "_1658477054693",
        "isLocked": false,
        "name": "grafana widget test",
        "param": "grafana widget test",
        "selectedItem": "",
        "shared": false,
        "type": 1,
        "weight": 10,
        "widgets": [
            {
                "cols": 7,
                "config": {
                    "configuredUrl": "https://homer/grafana/d-solo/R6G3kMaMzedddd/%24%7Bmetric%7D%20by%20%24%7Blabel%7D?from=1659387600000\u0026hasVariables=true\u0026orgId=1\u0026panelId=2\u0026rand=789238\u0026refresh=\u0026theme=light\u0026to=1659473999000\u0026viewPanel=6\u0026JWT=anonimisedJWT",
                    "dashboardSource": "R6G3kMaMzedddd",
                    "desc": "",
                    "id": "iframe-1_22f9bf3b-7594-47cb-b910-904df6fa2cf1",
                    "panelListValue": "${metric} by ${label}",
                    "params": {
                        "from": "1659560400000",
                        "hasVariables": true,
                        "orgId": 1,
                        "panelId": 2,
                        "rand": "628207",
                        "refresh": "",
                        "theme": "light",
                        "to": "1659646799000",
                        "viewPanel": 6
                    },
                    "serverUrl": "http://grafana:3000",
                    "title": "Grafana",
                    "typeDataRange": "global",
                    "url": "/d-solo/R6G3kMaMzedddd/%24%7Bmetric%7D%20by%20%24%7Blabel%7D"
                },
                "id": "iframe-1_22f9bf3b-7594-47cb-b910-904df6fa2cf1",
                "isWarning": false,
                "layerIndex": 2,
                "minHeight": 300,
                "minWidth": 300,
                "name": "iframe",
                "output": {},
                "rows": 5,
                "strongIndex": "IframeWidgetComponent",
                "tabGroup": "tabIndex-299959",
                "title": "Grafana",
                "x": 0,
                "y": 0
            }
        ]
    },
    "owner": "admin",
    "status": "ok",
    "total": 1
}

Sensitive parts of data that you might wanna anonymize are following: hostname in field serverUrl, hostname in field configuredUrl and in the same field in the end there's cutoff part of jwt which you also might want to hide. Both of the fields are in widgets -> config

In the meantime I'll try to replicate this issue

AlexeyOplachko commented 2 years ago

We have identified source of this issue, and will provide an update in foreseeable future

georghimself commented 2 years ago

We have identified source of this issue, and will provide an update in foreseeable future

awesome. thanks @AlexeyOplachko . so no need for me to replicated again? changed the bind port to 80 so i got it to work. grafana widget showed then. i installed everything on a second (exactly same system) and if i wanna open the settings of a grafana widget the window opens small an blank on the left side of the browser tested on chrome / firefox / safari. in incognito windows and on other pc . other widgets work

grafhomer

AlexeyOplachko commented 2 years ago

Thank you for your report, we're looking into a fix for this as well 👍

TomSipacom commented 1 year ago

We have identified source of this issue, and will provide an update in foreseeable future

Great! Thank you!