Problem Setting up Graphite data source

Hello folks,
I’m still new to Grafana btw, I want to setup graphite data source but there was an error with no text.

The documents mentioned graphite is built-in I don’t know if 127.0.0.1:8080 did the trick or did I miss some settings in conf?

I planned to setup a monitoring system to oversee some workstations diskspace and network performance.

Change the Access field to proxy.

You can see the real error by looking at the console in your browser. It is probably a cross origin error (a security feature in all modern browsers). Direct in this case means directly from your browser to the Graphite database. By using proxy, your requests are rerouted via the Grafana backend which adds CORS headers to avoid the cross origin error.

After I changed the access type to proxy, the error message shows as HTTP error bad gateway
So I basically need to install graphite separately ?

Yes. Grafana and graphite are two totally separate applications. Grafana is for visualizing data, especially time series databases. Graphite is a time series databases. Grafana can also visualize data from InfluxDB, Prometheus, ElasticSearch and many more.

I see, Thank you very much !

Hello folks,

Now that the graphite has been setup and the agent is already feeding the data from hosts.
I still can’t get grafana to setup graphite datasource saying ‘Bad Gateway’

Graphite and Grafana are on the same server

I installed Graphite through tins solution :
https://www.server-world.info/en/note?os=CentOS_7&p=graphite
The graphite will be configured through “local_settings.py”

Problem right now is I can’t access graphite console through web-browser from different host and Grafana can’t setup the graphite data source due to bad gateway error.

Sounds like it might be firewall problems? Are you using FirewallD or something similar?

For now I shutdown Firewalld and SElinux still I can’t access the console from another host’s browser.

I see the configuration file for Graphite in httpd folder I tried tweak it a few times still no progress but most of the topic on the internet said there’s something to be done right here in httpd.

I’m using centos7 as OS btw.

Did you manage to solve this? Not sure how I can help you with this sort of problem.

This happened to me and I am using a Digitalocean droplet.

I am running graphite using docker

docker run -d\
 --name graphite\
 --restart=always\
 -p 4040:80\
 -p 2003-2004:2003-2004\
 -p 2023-2024:2023-2024\
 -p 8125:8125/udp\
 -p 8126:8126\
 graphiteapp/graphite-statsd

The Graphite app is on 4040 . While adding it to the Grafan’s datasource http://myhost:4040 I got the same error trying to Save & Test : HTTP Error Bad Gateway .

I am writing the solution to fix this issue in case anyone else face similar thing. (the Access field has been removed from versions grafana > 6 )

  1. setup ufw to allow the ports
  • ufw allow 4040, 80, 2003, 2004, 2023, 2024, 8125, 8126 , 22, 8080, 443

  • ufw status

  • ufw enable (add sudo if not using a root)

(make sure you have allowed port 22, else you wont be able to ssh into your droplet)

  • reboot
  1. check if all the services are running, if not then restart the containers or redeploy.
  • docker ps -a
  1. you may first want to test if you get a response from the header using netcat

try this:

echo -en "HEAD / HTTP/1.0\r\n\r\n" | nc yourhost 4040

you will get a output like this

HTTP/1.1 200 OK

  1. and then try adding the graphite data source again, you will be happy to see the green tick :slight_smile:

Hi Guys,

The grafana (grafana-7.5.11-2.el8.rpm) package we have updated it to the below-mentioned version with dependency.

grafana-pcp-3.2.0-2.el8.x86_64.rpm
grafana-7.5.15-3.el8.x86_64.rpm

We are using “Graphite” as DB to connect with Grafana. It worked until we use old version (grafana-7.5.11-2.el8.rpm) and post to the update, the databse connection not worked.

During graphite connection, I get the error “origin not allowed”. also Attached here.

Could you please help us on fixing this issue…