Sharing dashboard

I am very new to this. I am trying to produce graphs of sensor data which can be shown on a squarespace website. I have a raspberry pi reading sensor data and sending them to influxdb and grafana (all running on a raspberry pi). I can see the graphs on grafana on my raspberry pi via community.grafana.com. This means that I can only view the graphs from a computer that is connected on the same network as the raspberry pi.

However, I want to be able to view the graphs (dashboard/panels), in realtime, from an external website (ideally sqaurespace but not necessarily) on a computer (not on the same network).

How is it possible to do this?

I know this may sound like a trite answer, but “set up network connectivity
between the machine you want to view the dashboard/s on and the machine
running Grafana”.

More helpfully, perhaps, I should ask “what is the problem about connecting
from the machine you want to view the dashboards on, to the machine where
Grafan is generating them?”

Antony.

Ohh i forgot to mention. The raspberry pi will be placed in a remote location far away from the computer i want to dashboards on.

I regularly work on machines which are on a different continent from myself,
with no problem whatsoever. The Internet is a wonderful facility.

So, I repeat my question: “what is the problem about connecting from the
machine you want to view the dashboards on, to the machine where Grafana is
generating them?”

Antony.

The problem is i do not know how to connect them. Is there a plugin i have to use or is there something built-in that would allow me to connect the two machines? I’m very new to all of this and i feel so lost.

Your question is nothing to do with Grafana as far as I can tell; it is just
network connectivity.

You have a browser on your computer. You enter the name or IP address of a
machine somewhere on the Internet into the address bar, and your browser, name
resolver and network stack all work together to connect you to that web
server, and you see the content it returns.

So, you just need to:

a) make sure the Raspberry Pi where Grafana is running has a public IP address
and is contactable from the Internet

b) enter the name (if you’ve set up DNS) or the IP address (if you haven’t) of
the Raspberry Pi into a browser on some other machine

and you should be prompted to log in to Grafana.

If you really don’t know much about networking, look up the tools “ping” and
“traceroute” because those will help you to find out whether your Raspberry is
accessible from the machine you want to run the browser on.

This really does not sound like a Grafana question to me, though.

Antony.

Thank you for the information that kinda helps a bit. Please bare with me if some of my questions seem trivial. I allowed port forwarding on my router and i can connect to the Pi using ssh but is there a way i can connect to grafana graphically without a remote desktop?

Also what if i want to embed an iframe on a sqaurespace website:

  1. When I go to Share>embed, it gives me the embedding iframe code but the link to the graph is community.grafana.com, that means it would not work on an external website correct?

  2. Will the embedded graphs update in realtime?

Okay let me start over and explain what i need help with. I am collecting sensor data and storing them on influxdb which is then displayed on Grafana on a raspberry pi. This raspberry pi will be placed in a different country. I want to be able to see these graphs from different country where the raspberry pi is connected. (if you havent already noticed, i dont know what i am doing with the ssh)

Ideally, i would embed the panel/dashboard onto a website but at least have an external link to the dashboard but whenever i try to get these links they’re always local only (community.grafana.com).

I want to be able to get a link which can be accessed by any computer so i can embed it on a website. Something like this:
https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now

PS: i can access the pi remotely but this is not what i am looking for. I want to be able to embed real-time graphs on a website but i cannot do that with a community.grafana.com/xxxxxx URL

Thank you for your patience :slight_smile:

  1. You are using an IP address to SSH to the Raspberry Pi, right?

  2. Substitute that address in place of “localhost” in the URL.

So, suppose the address you are SSHing to is 198.51.100.42

In your browser, put http://198.51.100.42:3000/xxxxxx

(also substituting /xxxxxx for whatever you meant in the URL you posted).

If that does not work, SSH to the Pi and run the command (as root):

netstat -lptn | grep 3000

and paste the output here.

Regards,

Antony.

Yes I can connect to my raspberry pi using an IP address to SSH because i enabled port forwarding on my router.

I tried putting http://:3000 but it says site cannot be reached. took too long to respond.

I ran the command on the pi and got this:
Screen Shot 2020-07-12 at 17.11.38

Yes I can connect to my raspberry pi using an IP address to SSH because i
enabled port forwarding on my router.

Okay, that part I do not understand.

I know fine well what port forwarding is, but why do you need to set up port
forwarding on your router in order to SSH to a remote Raspberry?

Surely you have outward connectivity to any address you like through your
router?

I tried putting http://:3000 but it says site cannot be
reached. took too long to respond.

Okay, so, not contactable :frowning:

I ran the command on the pi and got this:
Screen Shot 2020-07-12 at 17.11.38

Any chance you can copy and paste the text of whatever it showed?

Screenshots don’t come through to the email list, and aren’t clickable links
either.

Regards,

Antony.

My raspberry pi was connected to my router which is why i had to set up port forwarding (otherwise it would not connect via ssh). But nevermind, it works without port forwarding when i connect the pi to my hotspot.

This is what i get when I run the command “netstat -lptn | grep 3000” :
tcp6 0 0 :::3000 :::* LISTEN 454/grafana-server

Excellent. That means that Grafana is listening on any interface, any address
which is assigned to your Pi.

I now do not understand why you got a timeout when entering the IP address of
the Pi, port 3000, into a browser - I assume you did that from the same
machine as you can connect to the Pi’s IP address by SSH?

Antony.

Yes that’s correct. I am connecting to the Pi via SSH from my Macbook and when i try accessing this URL on my Macbook: :3000, i get a timeout

Try installing tshark (the text version of wireshark) on the Raspberry, run
the command (as root):

tshark -i any -f "port 3000"

and then try again with the browser.

Tshark should show you the packets coming from the Mac and the replies going
back again. Press Ctrl/C to stop tshark.

If there is nothing, it means something is blocking the packets from getting
from the Mac to the Raspberry.

If you see the requests but no replies, it means there’s a problem with
Grafana, or something on the Raspberry is blocking the replies.

Regards,

Antony.

I found a work around. An online port forwarding service and it works nicely.

Thank you very much for your help. I really appreciate it Antony :smiley:

Hi

So for sharing the dashboard to someone else or to some other computer we need to do this port forwarding?
i am also not able to share my dashboard with my team, when i click on share it gives link as community.grafana.com, i installed grafana on a ec 2 server and when tried its public ipv4:3000 it prompts bad gateway.
how can i share dashboard with interactive dropdowns in line with others?

i got the solution, needed to add inbound rules in ec2 server security for
TCP, once done i was able to do ipaddress:3000 and it prompted for grafana login