Doing so was quite an adventure since it was hard to find an adequate installation procedure. There are no official RPMs out there, so I had to built my own.
Again, with the hint of a colleague, I was able to get the whole thing done with the following three part series blog post
- Installing Graphite on CentOS - Part 1 - Building the RPMs
- Installing Graphite on CentOS - Part 2 - Setting up Graphite
- Installing Graphite on CentOS - Part 3 - Posting some Data to Graphite
First, I had to get all the dependent software, for building the RPMs and then installing Graphite.
On my virtual machine, I also had to get the
Although the blog post used version 0.9.9, I have tried my luck with version 0.9.10. You might want to skip these steps, since it did not work out and I have reverted to 0.9.9 anyways.
As normal user do the following:
Edit the spec if you want to add a suffix to the end of the release information and to add a description
Now, let’s do the same for carbon and graphite
Here, I got an error saying:
So, I had to find all files containing “distro” by
grep -iR 'distro' *. The result was
MANIFEST.in where I changed “distro” to “dist”. Ran the command again and it worked.
But then I have realized, that the directory “dist” did not exist at all. Clever me! What did I do then? Removed everything and continued with the 0.9.9 versions of whisper, carbon and graphite.
Okay, that was the point where I have removed everything and continued with version 0.9.9.
Building the RPMs and installing Graphite
Let’s continue with part two of the blog post series where we setup graphite.
It starts by installing some dependencies, but I have skipped that, because they are a partial repetition of what we have already installed. Then all RPMS will be installed, but we have already done that as well.
We continue with setting up carbon and graphite-web configuration files.
Where I have added/uncommented/edited the following lines:
Let’s create the Django database with:
You will be asked to create a superuser. I have answered that with a ‘no’.
Apache and wsgi is next. I already had those two, but if you want to install it do `sudo yum install -y httpd wsgi.
Next create the file
/etc/httpd/conf.d/graphite.conf as descibed in the blog post.
/etc/httpd/conf.d/wsgi.conf look like this:
Now, set some rights:
Almost done. Create a start/stop-script
/etc/init.d/carbon-cache as described in the post and make it executable:
Start everything up as root:
And finally: Test if the webapp works by pointing your browser to
http://localhost:9080. My ports are a bit different since I am using vagrant with port-forwarding.
Nope, did not work. In
/var/log/httpd/graphite_error_log, I got the following:
The file was not there at all … Anyways, that had something to do with permissions. After some googling I ran into
That did it! It worked! Strange, because I was sure I have already did that.
Feeding Data into Graphite
Let’s get some data and visualize it. How this is done is explained in the last and third part of the excellent blog post.
Graphite is listening on ports 2003 and 2004 for incoming data. You can check that by running
nmap -v -sT localhost. The format of the data is
object value timestamp.
Am not repeating the example from the blog post here, but showing another example from the sensu community plugin:
Plus, I had to add the following section to
In Graphite, I was then selecting a few of those measurements to let them be visualized in the dashboard:
And there we finish this article, whereas the original blog post still goes on with more ways on how to gather data and feed it into graphite. Check it out!
Done for today.