Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get graphics in "Grafana" #7

Open
Zakspeed opened this issue Jul 5, 2021 · 7 comments
Open

I can't get graphics in "Grafana" #7

Zakspeed opened this issue Jul 5, 2021 · 7 comments

Comments

@Zakspeed
Copy link

Zakspeed commented Jul 5, 2021

Grafana warns me with an exclamation in red:
"Method Not Allowed" in all panels.

Docker Version:

Client: Docker Engine - Community
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.13.10

I think the problem may come that my network is in:
192.168.0.XXX

The only weird thing I see is in the "sonos" service; since in the logs it indicates: ``` No Sonos discovered`. ``

docker-compse ps:
internet-monitoring_grafana_1      /run.sh                          Up      0.0.0.0:3030->3000/tcp
internet-monitoring_nodeexp_1      /bin/node_exporter --path. ...   Up      0.0.0.0:9100->9100/tcp
internet-monitoring_ping_1         /bin/blackbox_exporter --c ...   Up      0.0.0.0:9115->9115/tcp
internet-monitoring_prometheus_1   /bin/prometheus --config.f ...   Up      0.0.0.0:9090->9090/tcp
internet-monitoring_sonos_1        python ./sonos_exporter -- ...   Up
internet-monitoring_speedtest_1    npm run start                    Up      0.0.0.0:9696->9696/tcp

LOGS:

,> speedtest-exporter@0.0.1 start /home
,> node index.js
,> speedtest-exporter@0.0.1 start /home
,> node index.js
,   ╭──────────────────────────────────────╮
,   │                                      │
,   │   Update available 5.6.0 → 7.19.1    │
,   │      Run npm i -g npm to update      │
,   │                                      │
,   ╰──────────────────────────────────────╯
,> speedtest-exporter@0.0.1 start /home
,> node index.js
,/metrics
,speedtest:  { download: 51.695, upload: 24.189, ping: 69.4 }


......
level=info ts=2021-07-05T09:22:21.492Z caller=node_exporter.go:113 collector=vmstat
level=info ts=2021-07-05T09:22:21.492Z caller=node_exporter.go:113 collector=xfs
level=info ts=2021-07-05T09:22:21.492Z caller=node_exporter.go:113 collector=zfs
level=info ts=2021-07-05T09:22:21.492Z caller=node_exporter.go:195 msg="Listening on" address=:9100
level=info ts=2021-07-05T09:22:21.492Z caller=tls_config.go:191 msg="TLS is disabled." http2=false

...
level=info ts=2021-07-05T09:22:13.483Z caller=main.go:395 msg="Received SIGTERM, exiting gracefully..."
level=info ts=2021-07-05T09:22:21.602Z caller=main.go:224 msg="Starting blackbox_exporter" version="(version=0.19.0, branch=HEAD, revision=5d575b88eb12c65720862e8ad2c5890ba33d1ed0)"
level=info ts=2021-07-05T09:22:21.602Z caller=main.go:225 build_context="(go=go1.16.4, user=root@2b0258d5a55a, date=20210510-12:56:44)"
level=info ts=2021-07-05T09:22:21.603Z caller=main.go:237 msg="Loaded config file"
level=info ts=2021-07-05T09:22:21.603Z caller=main.go:385 msg="Listening on address" address=:9115
level=info ts=2021-07-05T09:22:21.603Z caller=tls_config.go:191 msg="TLS is disabled." http2=false

...
level=info ts=2021-07-05T09:22:22.078663612Z caller=web.go:380 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=info ts=2021-07-05T09:22:22.07869099Z caller=targetmanager.go:71 component="target manager" msg="Starting target manager..."
level=info ts=2021-07-05T09:22:22.078663528Z caller=main.go:314 msg="Starting TSDB"
level=info ts=2021-07-05T09:22:22.230863341Z caller=main.go:326 msg="TSDB started"
level=info ts=2021-07-05T09:22:22.230941546Z caller=main.go:394 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2021-07-05T09:22:22.233563579Z caller=main.go:371 msg="Server is ready to receive requests."


...
t=2021-07-05T09:33:07+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=403 remote_addr=172.19.0.1 time_ms=1 size=10 referer=
t=2021-07-05T09:33:18+0000 lvl=warn msg="Request Origin is not authorized" logger=live origin=http://192.168.0.2:3030 appUrl=http://localhost:3000/ allowedOrigins=
t=2021-07-05T09:33:18+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=403 remote_addr=172.19.0.1 time_ms=1 size=10 referer=
t=2021-07-05T09:33:21+0000 lvl=warn msg="Request Origin is not authorized" logger=live origin=http://192.168.0.2:3030 appUrl=http://localhost:3000/ allowedOrigins=
t=2021-07-05T09:33:21+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=403 remote_addr=172.19.0.1 time_ms=1 size=10 referer=

...
level=info ts=2021-07-05T08:37:38.931Z caller=node_exporter.go:113 collector=uname
level=info ts=2021-07-05T08:37:38.931Z caller=node_exporter.go:113 collector=vmstat
level=info ts=2021-07-05T08:37:38.931Z caller=node_exporter.go:113 collector=xfs
level=info ts=2021-07-05T08:37:38.931Z caller=node_exporter.go:113 collector=zfs
level=info ts=2021-07-05T08:37:38.931Z caller=node_exporter.go:195 msg="Listening on" address=:9100
level=info ts=2021-07-05T08:37:38.931Z caller=tls_config.go:191 msg="TLS is disabled." http2=false

...
level=info ts=2021-07-05T08:37:38.850Z caller=main.go:225 build_context="(go=go1.16.4, user=root@2b0258d5a55a, date=20210510-12:56:44)"
level=info ts=2021-07-05T08:37:38.851Z caller=main.go:237 msg="Loaded config file"
level=info ts=2021-07-05T08:37:38.851Z caller=main.go:385 msg="Listening on address" address=:9115
level=info ts=2021-07-05T08:37:38.851Z caller=tls_config.go:191 msg="TLS is disabled." http2=false
level=info ts=2021-07-05T09:02:14.226Z caller=main.go:395 msg="Received SIGTERM, exiting gracefully..."

Discovering Sonos...
INFO:soco.discovery:Set of attached IPs: {'172.18.0.1', '192.168.0.2', '172.20.0.1', '172.23.0.1', '172.17.0.1', '172.19.0.1'}
INFO:soco.discovery:Sending discovery packets on [<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>, <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('0.0.0.0', 0)>]
No Sonos discovered.
INFO:root:Start server 0.0.0.0:1915
@ItsDrike
Copy link

ItsDrike commented Jul 5, 2021

I'm having the same issue, I've just installed and ran docker-compose for the first time

image

@maxandersen
Copy link
Owner

What os see you Running it on ?

For Sonos to Discovery to work the container must be running in hostmode to be able to see the devices.

Not all OS and docker setup allows that.

@ItsDrike
Copy link

ItsDrike commented Jul 6, 2021

What os see you Running it on ?

For Sonos to Discovery to work the container must be running in hostmode to be able to see the devices.

Not all OS and docker setup allows that.

I'm running 5.4.119-1-pve kernel from Proxmox, this is an LXC container running docker, I've managed to get it working without problems with my custom fork (full-update branch): ItsDrike#1 heavily inspired by https://github.com/geerlingguy/internet-pi/tree/master/internet-monitoring. But the original implementation just wouldn't work for some reason, I figured the repository was quite outdated and didn't look that much deeper into it.

@Zakspeed
Copy link
Author

Zakspeed commented Jul 6, 2021

What os see you Running it on ?
For Sonos to Discovery to work the container must be running in hostmode to be able to see the devices.
Not all OS and docker setup allows that.

I'm running 5.4.119-1-pve kernel from Proxmox, this is an LXC container running docker, I've managed to get it working without problems with my custom fork (full-update branch): ItsDrike#1 heavily inspired by https://github.com/geerlingguy/internet-pi/tree/master/internet-monitoring. But the original implementation just wouldn't work for some reason, I figured the repository was quite outdated and didn't look that much deeper into it.

I finally use this repository:
https://github.com/geerlingguy/internet-pi/tree/master/internet-monitoring

Many thanks for all.

@dreondre
Copy link

I was encountering the same issue and in order to fix it I did the following:

  1. Click Configuration > Data Sources
  2. Clicked prometheus
  3. I noticed that when I clicked Save and Test I was getting the error: "HTTP error Method Not Allowed"
  4. Changed the method from POST to GET
  5. Clicked Save and Test (no error)
  6. Go back to the dashboard

I found that restarting or recreating the container resets this setting.

@yitzyb
Copy link

yitzyb commented Sep 14, 2021

I was encountering the same issue and in order to fix it I did the following:

  1. Click Configuration > Data Sources
  2. Clicked prometheus
  3. I noticed that when I clicked Save and Test I was getting the error: "HTTP error Method Not Allowed"
  4. Changed the method from POST to GET
  5. Clicked Save and Test (no error)
  6. Go back to the dashboard

I found that restarting or recreating the container resets this setting.

This does in face fix the issue, but if you restart the services, it reverts back to 'post'

@theniwo
Copy link

theniwo commented Oct 13, 2021

Change it in the config file and/or use prometheus:latest

grep -r POST *
blackbox/config/blackbox.yml:      method: POST

;)

GeorgeDewar pushed a commit to GeorgeDewar/internet-monitoring that referenced this issue Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants