Almost a year ago I blogged about Metrics and Graphite. Since then graphite has become an increasingly used and important tool used by all teams at my current customer. Graphite is used in many interesting ways, not only to monitor, visualize and understand a complex distributed system but to understand user behavior, A / B testing analysis and much more.

The default graphite web is not that great, it is cumbersome to construct dashboards and graphs and does not allow click and drag to zoom in on an area of interest in a graph. As a result of this there are many alternative dashboards for graphite, some that focus on a narrow use case like presenting many metrics, and some that just try to improve on some aspect (like zoom in, client side rendering, nicer looks, etc). Most require editing of json files to construct the dashboards and define the graphs.

About 4-6 months ago I introducing Kibana at my customer, an INCREDIBLE search and visualization dashboard for logs. All our application logs are feed into Elasticsearch and become instantly searchable in Kibana that can show trends per application, server, or specific error or message and much more. Kibana is a single page, client side only application that lets you construct dashboards filled with different types of panels that show results of your log queries in useful ways. I will try to blog more about Kibana and how incredibly helpful it is!

Anyway,  Kibana has a great architecture and ui design for creating dashboards and organizing panels into rows and columns. Something I felt was missing in all graphite dashboards. So I started by creating a copy of the histogram panel in Kibana and added graphite support. It was done relatively quickly. With only that step done I already could construct dashboards full with graph panels, click and drag to zoom in, save dashboard and load dashboards to/from Elasticsearch.

It was then that I realized that this could actually be a pretty great general purpose graphite dashboard. If I focused a lot on graph editing and composing it could fill a gap in the current alternative dashboards.

So after a very intensive December and January where I coded almost every free hour I could find (in spare time, not work time) I managed to create a graphite dashboard which I named Grafana. I created a website for it ( to showcase its features.

One of its many signature features is a graphite expression parser that allows better editing of functions and parameters. It also makes understanding and reading graphite target expressions much easier.

alias(summarize(sumSeries(prod.apps.touchweb.*.timers.requests.startpage_index_get.count),'1min'),'start page')

An expression like the one above is in Grafana visualized as:

You can click any metric segment to select alternatives, click on the function and edit parameters. You can click the pen and edit the target expression in a text box if you want.

Since the initial release of Grafana the response and feedback has been amazing. Over 1238 starts on github, 91 closed issues, 41 open, 9 releases with many fixes and new features. In Grafana 1.4 which was recently released I added support for annotations.

View this video for a quick intro and a tour of the features in Grafana.

Github project:


Krishna Raj said...

Hi Torkel, this is amazing. I love Grafana. I am using ElasticSearch with Kibana.And want to use Grafana + ES. But I hit the roadblock. What I am doing is:

1) Running ES on a port: 9200.
2) Running Grafana under a webserver(tomcat)
3) I edited the Config.js and pointed ES
4) I dont use Graphite.

Where do i mention the index ?

I tried several things and gave up.

I dont know what mistake I am doing.

Can I get a Sample Config.js and sample json for dashboard when using ElasticSearch.

Your help is greatly appreciated !!

Thanks !

Unknown said...

If you don't use graphite, what's the point ?

Anonymous said...

Can you explain what is going on with port 5656? How does one install grafana with Apache2? There's no indication apache will know anything about grafana, or where to find it on the filesystem.

I have ES running on port 9200, and i get a response:

"status" : 200,
"name" : "Krista Marwan",
"version" : {
"number" : "1.1.1",
"build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
"build_timestamp" : "2014-04-16T14:27:12Z",
"build_snapshot" : false,
"lucene_version" : "4.7"
"tagline" : "You Know, for Search"

I've configured config.js accordingly, but totally clueless from the instructions in how to "Point your browser to the installation". What URL are you referring to?


Anonymous said...

P.S. for that matter, how does elasticsearch know anything about the Grafana? Presumably, something needs to be able to locate the config.js file!

Anonymous said...

Ahh. You are assuming that my default server install should point to the grafana root. Now, why would I do that??

I have already configured Graphite as my default install for the server. You should say in your documentation that you need to configure your web browser to point to grafana root, with an alias, or a new IP.

Normally that is not standard. I've installed both Descartes and Graphiti, which is not the default behavior.

I bet you'll get more users if you clean up your documenation...

Torkel Ödegaard said...

Grafana is client side only application and can be hosted by any web server (apache, nginx, IIS). It is just static files. The application is executed in the browser. It is the browser that will load config.js, the browser that will load/save dashboards to elasticsearch, fetch metrics from graphite etc.

If you need help with hosting a static content folder with a web server please check the documentation for the web server you are using (apache, nginx, etc)

Anonymous said...

Grafana won't connect to elasticsearch running on the same host to save. Curling localhost:9200 gets an elasticsearch response. Posting with Curl works just fine. Thoughts?

Torkel Ödegaard said...

Check chrome developer tools and check what the request result is when Grafana is trying to save to Elasticsearch

Rekhila said...

Your blog is more informative..Its very interesting to know about new things..Keep on sharing.
Dotnet training in chennai

Phan Hoang Sang said...

Đến với dịch vụ thiết kế web trọn gói tại MAINISAN quý khách sẽ được thiết kế web giá rẻ theo yêu cầu, khi tìm trên google website của bạn sẽ là mẫu Thiết kế web chuyên nghiệp giá rẻ, chúng tối chuyên thiết kế website theo mẫu đến khi hoàn thiện.
Bước đầu thiết kế web tại Blog thiết kế web bạn nên chọn đơn vị thiết kế website có giao diện mobi, hệ quản trị đơn giản dễ sử dụng.Chúng tôi không cạnh tranh về giá chỉ cạnh tranh về chất lượng, tuy nhiên MAINISAN.COM cũng thường xuyên có khuyến mãi giảm giá khi thiết kế web trọn gói để đáp ứng nhu cầu quý khách.