Monday, October 3, 2011

Scalable realtime stats with Graphite

Introduction


Here at Adku, we’re always looking for ways to move faster and smarter.  There’s nothing worse than having to wait a day or two to see if a code push has a positive or negative effect on our bottom line.  One way to track application issues is to create a stat and graph it.  While there’s a litany of solutions out there today, we’re using Graphite, a realtime graphing framework and we love what its done for us thus far.  Here’s what Graphite can do:


We recently went through the process of setting up our own Graphite cluster and below are the references/steps that we used to get everything running.  We hope this helps :)


Graphite installation guide


This guide will install all the software packages required to get you up and running.  Graphite will be setup to run across multiple machines.  NOTE, these steps are virtually verbatim copies of our setup scripts.  We are assuming you’re working with a clean Ubuntu 10.04 LTS installation (we’re using Ubuntu AMIs on EC2)  We will NOT be delving into specifics for all non-Graphite related apps.  In case you’re curious, this guide will install the following packages:

Process control - supervisor - akin to init.d
Web serving - nginx, uwsgi - akin to apache + mod_wsgi/mod_python
Caching - memcached
Stats collection - statsite - akin to Etsy’s statsd without a dependency on node.js
Graphite - graphite-web, carbon, whisper - required for stats collection


Step 2 - Run bootstrap.sh

Step 3 - Copy all files from the archive into /etc and /opt respectively

Step 4 - Update following config variables

/etc/nginx/nginx.conf - worker processes (line 4)
/etc/nginx/sites-enabled/graphite - public hostname (line 3)
/etc/supervisor/supervisord.conf - web processes (line 39)
/opt/graphite/conf/carbon.conf - storage dir and cluster servers (line 2 and line 96)
/opt/graphite/conf/relay-rules.conf - cluster servers (line 3)
/opt/graphite/conf/storage-schemas.conf - retention times (line 4 - optional)
/opt/graphite/webapp/graphite/local_settings.py - storage dir and cluster servers (all lines)

Step 5 - Setup the graphite-web - Django app

cd /opt/graphite/webapp/graphite
yes no | python manage.py syncdb

Step 6 - Spin up supervisord - should spin up all other processes

sudo supervisorctl status
sudo supervisord (only if needed)

Step 7 - Ensure that our processes didn’t blow up

sudo tail -f /var/log/supervisor/*.log

Step 8 - Feed stats to your cluster.  For a list of clients see


Step 9 - Check your stats server that your stat showed up!

http://statsd.yourhost.com:7001/


Further reference

Graphite

nginx/uwsgi - used for web serving

statsite - Python implementation of Etsy’s statsd

74 comments:

  1. This article helps us a lot. I appreciate your help on sharing these guides. Thanks!

    Accounting Packages

    ReplyDelete
    Replies
    1. Hello friends, i have nice information, click it Untuk tips bermain bisa dilaksanakan dengan mudah dan benar jika pemain masuk ke dalam bandar king4d online yang menyediakan judi togel online yang terpercaya dan aman. Bandar inilah yang harus dipilih untuk lebih mudahnya bermain togel lxtoto online dan memenangkannya dengan hasil yang nyata. Selain itu, tips bermain judi togel online itu mudah ditemukan di internet. Dengan banyak menggali dan mencari informasi yang akurat dan tepat serta berhubungan dengan judi Eyang Togel, maka akan menemukan tips bermain yang sangat tepat untuk dilaksanakan dalam setiap permainan judi online yang dilaksanakan. Tips unik dan berbeda dengan pemain lain juga bisa ditemukan banyak di dunia maya Toto Singapore. Namun di sini pemain diharuskan untuk banyak mencari informasi yang inspiratif, trik, cara dan tips dalam melaksanakan setiap permainan judi togel totojitu online ini. Selain itu, jam terbang yang banyak dan aktif di bandar 8togel online juga akan berpengaruh untuk pemain memiliki cara terbaik sendiri. Jika tips bermain bisa ditemukan, maka tugas utama pemain judi sekarang ini adalah memilih bandar judi togel king4d online yang aman. Tugas intim yang wajib ditemukan supaya bisa melaksanakan tips bermain dengan mudah dan memenangkan setiap permainan judi togel online. Untuk bisa lebih mudah dalam menemukan Bandar togel lotus4d online yang aman, pemain judi diharapkan untuk memperhatikan beberapa hal berikut ini yang menuntun pemain judi dalam menemukan bandar yang tepat sasaran dan terjamin keamanannya.

      Delete
  2. Hi,

    Thanks

    I do all step to post, but i started supervisor and uWSGI don't started.

    This error is
    *** Starting uWSGI 1.4.5 (32bit) on [Wed Feb 20 18:30:36 2013] ***
    compiled with version: 4.6.3 on 20 February 2013 17:29:32
    os: Linux-3.6.11+ #377 PREEMPT Sat Feb 16 17:31:02 GMT 2013
    nodename: raspian
    machine: armv6l
    clock source: unix
    detected number of CPU cores: 1
    current working directory: /
    detected binary path: /usr/local/bin/uwsgi
    uWSGI running as root, you can use --uid/--gid/--chroot options
    *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
    your processes number limit is 3377
    limiting address space of processes...
    your process address space limit is 536870912 bytes (512 MB)
    your memory page size is 4096 bytes
    detected max file descriptor number: 1024
    lock engine: pthread robust mutexes
    uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
    Python version: 2.7.3 (default, Jan 13 2013, 12:38:42) [GCC 4.6.3]
    Fatal Python error: exceptions bootstrapping error.


    could you help me?


    ReplyDelete
  3. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai Java Training in Chennai

    Online Java Training Java Online Training | Java 8 online training | JavaEE Training in Chennai

    ReplyDelete
  4. Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training

    ReplyDelete
  5. I accidentally saw your post and it attracted me from the first few seconds, it was excellent, hope you have more successful posts. I like this post because it contains a lot of useful information to read, maybe everyone will like me.
    Jogo para criança, io games for school, cá koi mini, jogo 360 2019

    ReplyDelete
  6. It's actually a cool and useful piece of info. I'm satisfied that you shared this helpful info with us. Please stay us up to date like this. Thank you for sharing.

    www.caramembuatwebsiteku.com/tips-tentang-struktur-website

    ReplyDelete
  7. الرطوبة هي مهمة جدا لعلم وظائف الأعضاء النمل الأبيض. سوف يجف النمل الأبيض ويموت إذا لم يكن في مكان رطب. أريزونا صحراء 90 ٪ ، وخلصت إلى أنها حالة جافة ، بالنسبة للجزء الأكبر. النمل الأبيض متستر ، تذكر. النمل الأبيض يعيش في أكوام تسيطر عليها بيئيا. هذا يعني أنك بحاجة إلى التأكد من عدم وجود أي تسرب أو رطوبة في منزلك. غرفة الغسيل والحمامشركة مكافحة حشرات بالاحساء
    شركة مكافحة حشرات بالدمام

    ReplyDelete
  8. Unul dintre cele mai bune lucruri despre Filme Turcesti este ca au fani în lumea întreaga, întrucât fac de obicei filme de razboi, care au o nota proprie de via?a regala ?i de toate din vremurile stravechi. Filme Turcesti este de asemenea descarcat de pe aceasta pagina.

    ReplyDelete
  9. Clicksud shows: www.pinoy1channel.com/, TVpenet shows, rulare shows, Romanian shows full hd episodes online for free

    ReplyDelete
  10. Comprehensive National Football League news, scores, standings, fantasy games, rumors, and more.
    Green Bay Packers Football
    New England Patriots Game Today
    LA Rams Game
    Colts Game
    Broncos Game

    ReplyDelete
  11. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. Eminem is an American rapper and one of the most successful artists in hip-hop. As of 2020, Eminem net worth is now estimated to be $230 million.

    ReplyDelete
  12. That’s a nice article, thank you for a great article. It helped me a lot. Keep it up Must Visit panda klantendienst

    ReplyDelete
  13. Thanks for sharing such an Amazing information, I Couldn't leave without reading your blog. I have read another good blog, I think you have read it too. click here helpdesk AVG

    ReplyDelete
  14. Urmăriți cel mai popular și plăcut seriale Episodul complet zilnic pe Clicksud. Oferim telespectatorilor noștri toate cele mai recente seriale pe care le veți putea urmări în timpul liber. Oamenii adoră să se uite la emisiunile și reluările TV preferate în timpul lor liber. Acum urmăriți și bucurați-vă de seriale online în hd cu subtitrare în engleză. click here

    ReplyDelete
  15. Look for the qualities like, read about the website from which you are going to take the expert solution for your assignments. Compare with another website so that you can understand which website is providing affordable papers experts. Look at the sample assignments so that you can understand how much presentable, unique, and attractive your assignment going to look like. Read the review and feedback of the students who have taken services from the experts of the particular paper help website. So, before starting anything, become sure that you are investing your money in the correct place. Because at the end of the day you want your assignment to be completed within the due date provided by your school/college/university.

    ReplyDelete
  16. Urmăriți cel mai popular și plăcut seriale Episodul complet zilnic pe Clicksud. Oferim telespectatorilor noștri toate cele mai recente seriale pe care le veți putea urmări în timpul liber. Oamenii adoră să se uite la emisiunile și reluările TV preferate în timpul lor liber. Acum urmăriți și bucurați-vă de seriale online în hd cu subtitrare în engleză. https://raysside.com/

    ReplyDelete
  17. Hey, thank you a lot for sharing this article with us. I can’t say, how grateful we are to read this. Also, I would love to share it with my friends and family, who are interested. I hope you will publish such articles in the future as well. It’s so helpful. Goodbye! Take a look at this wonderful article and download clash of clans MOD APK 2021 for free And visit ModsDroid.

    ReplyDelete
  18. Do you want to Change Ink in HP Envy 4520? by using the rules below, you'll skill to vary ink within the HP Envy 4520 printer. If the cartridge is low ink level or running out of ink, you would like to substitute it with a replacement genuine cartridge. Understand the fast steps and complete procedure to vary ink in HP Envy 4520 printer. For more information you can call on printer customer care number (Toll-Free) and you can also visit our official website.

    ReplyDelete
  19. Thank you so much for sharing all this wonderful information !!!! It is so appreciated!! You have good humor in your blogs. So much helpful and easy to read!
    Java classes in Delhi
    Java classes in Mumbai


    ReplyDelete
  20. Good News received from the ( COC MOD and GBWhatsapp ) ... This are the only sites that offers us all the latest updated WhatsApp Alternatives.. We can use this WhatsApp on our phone for our primary and secondary WhatsApp numbers...I thought it will be useful for us..That's why I shared it with all of us...Thank you

    ReplyDelete
  21. In general, we can see that most of the people are struggling to find the stuffs when you want to know. If you are looking for the same, then without going for a second thought, go ahead with this- Check new posts- fmwhatsapp and gbwhatsapp

    ReplyDelete
  22. toptan iç giyim tercih etmenizin sebebi kaliteyi ucuza satın alabilmektir. Ürünler yine orjinaldir ve size sorun yaşatmaz. Yine de bilinen tekstil markalarını tercih etmelisiniz.

    Digitürk başvuru güncel adresine hoşgeldiniz. Hemen başvuru yaparsanız anında kurulum yapmaktayız.

    tutku iç giyim Türkiye'nin önde gelen iç giyim markalarından birisi olmasının yanı sıra en çok satan markalardan birisidir. Ürünleri hem çok kalitelidir hem de pamuk kullanımı daha fazladır.

    nbb sütyen hem kaliteli hem de uygun fiyatlı sütyenler üretmektedir. Sütyene ek olarak sütyen takımı ve jartiyer gibi ürünleri de mevcuttur. Özellikle Avrupa ve Orta Doğu'da çokça tercih edilmektedir.

    yeni inci sütyen kaliteyi ucuz olarak sizlere ulaştırmaktadır. Çok çeşitli sütyen varyantları mevcuttur. iç giyime damga vuran markalardan biridir ve genellikle Avrupa'da ismi sıklıkla duyulur.

    iç giyim ürünlerine her zaman dikkat etmemiz gerekmektedir. Üretimde kullanılan malzemelerin kullanım oranları, kumaşın esnekliği, çekmezlik testi gibi birçok unsuru aynı anda değerlendirerek seçim yapmalıyız.

    iç giyim bayanların erkeklere göre daha dikkatli oldukları bir alandır. Erkeklere göre daha özenli ve daha seçici davranırlar. Biliyorlar ki iç giyimde kullandıkları şeyler kafalarındaki ve ruhlarındaki özellikleri dışa vururlar.

    ReplyDelete
  23. mulțumesc pentru actualizare. distribuiți un articol unic. împărtășim toate cele mai târzii subtitrate în română. ASK MANTIK INTIKAM.

    ReplyDelete
  24. mulțumesc pentru actualizare. distribuiți un articol unic. împărtășim toate cele mai târzii subtitrate în română. Mostenirea.

    ReplyDelete
  25. Thanks for the detailed article on this topic. I would like to see more such awesome articles from you. Download GBWhatsApp APK

    ReplyDelete
  26. Thanks for sharing this valuable piece of information. Keep sharing more such awesome articles in the future. Goodbye! Download FMWhatsApp APK

    ReplyDelete
  27. Thanks for providing such a detailed information with us. Keep sharing stuff like this. Also download COC MOD Apk.

    ReplyDelete
  28. Thank you for sharing Graphite installation guide. I was looking for it for so many days! Download COC Mod APK

    ReplyDelete
  29. Thanks for the detailed article on this topic. Also you can get the new and best features of GBWhatsapp which are coming in 2022- GBWhatsapp 2022 APK

    ReplyDelete
  30. Thanks for the detailed article on this topic. I would like to see more such awesome articles from you. Also you can get the new and best features of FMWhatsapp which are coming in 2022- FMWhatsapp APK

    ReplyDelete
  31. Relate with expert java teachers online for java direction or need regulation with study or assignments. Chat with excellent java assignment help during Java programming students normally struggle with all subject’s complexities and review honest write my assignment. Java programming appears an irresistible subject and fragments comprehend the compulsion to address themselves to acquire the subject. For every sort of support with your Java assignment, you are desired to sense our website for descriptions finished by our 24 X 7 online buyer support. do my essay

    ReplyDelete
  32. Apasa pe vizionează https://clicksud.su cel mai recent episod din in hd. Distribuim toate cele mai recente Seriale turcesti pe site-ul nostru Clicksud. https://clicksud.su Vă permite să jucați și să vă bucurați de divertisment de la Clicksud.

    ReplyDelete
  33. Faye Chrisley :- Faye Chrisley is an American reality TV star. She is well-known for playing Nanny in the American TV series Chrisley Knows Best.

    Christi Pirro :- Christi Pirro is a lawyer and a law clerk. She is well-known as Jeanine Pirro’s daughter. Jeannie, her mother, is a TV broadcaster and writer.


    Pokimane :- Pokimane is a famous Canadian twitch streamer and YouTuber. However, she is famous for her streaming on games. So, she mostly played two games

    ReplyDelete
  34. Jean Muggli :- Jean Muggli came to popularity as the former wife of Michael Strahan, a retired professional American football player



    Courtney Thorne-Smith :- Courtney Thorne-Smith is an American actress known for her multiple roles in some of the popular television series of all time.


    Brooke Daniells :- Brooke Daniells is a popular and professional photographer from the United States of America


    Simeon Panda :- Simeon Panda is a true role model for anyone who wishes to achieve success in the field of bodybuilding.

    ReplyDelete
  35. Apasa pe vizionează https://clicksud.cc cel mai recent episod din in hd. Distribuim toate cele mai recente Seriale turcesti pe cc-ul nostru Clicksud. https://clicksud.cc
    Vă permite să jucați și să vă bucurați de divertisment de la Clicksud.

    ReplyDelete
  36. Apasa pe vizionează https://clicksudd.com/clicksud/ cel mai recent episod din in hd. Distribuim toate cele mai recente romaseriale pe site-ul nostru https://clicksudd.com/clicksud/ Vă permite să jucați și să vă bucurați de divertisment de la Clicksud.

    ReplyDelete
  37. Do not miss your chance to enjoy today. Numerous new games that you update are similar to this game like Huggy Wuggy Pop It Jigsaw. Discover and perfect in your free time.

    ReplyDelete
  38. İnstagram takipçi satın al! İnstagram takipçi sitesi ile takipçi satın al sende sosyal medyada fenomen olmaya bir adım at. Sende hemen instagram takipçi satın almak istiyorsan tıkla:

    1- takipçi satın al

    2- takipçi satın al

    3- takipçi satın al

    ReplyDelete
  39. Vi los mejores dramas turcos aquí. Tengo una gran experiencia con este sitio (https://seriesturcas.cc/).
    Gracias!!

    ReplyDelete
  40. 토토사이트 Good day very cool web site!! Man .. Beautiful
    .. Wonderful .. I'll bookmark your website and take the feeds also?
    I am satisfied to find so many helpful info here in the put up, we want
    work out more strategies on this regard, thank you for sharing.

    ReplyDelete
  41. 스포츠중계 Great beat ! I wish to apprentgice at tthe same time as you amend yor site, how can i subscribe for a blog website?
    Thee account aided mee a applicable deal. I have been a little bit familiar of this your broadcast provided bright clear concept

    ReplyDelete
  42. 토토사이트 what a great post... i always come for read your post because of your content. keep posting

    ReplyDelete
  43. مرحبًا ، نحن أفضل شركة من شركات استيراد اسطمبات بلاستيك في العالم نحن نقدم آلات عالية الجودة بأسعار تنافسية للغاية. يتم دعم أجهزتنا من قبل فريق من المهندسين المهرة وذوي الخبرة المستعدين دائمًا لمساعدتك في أي مشاكل قد تواجهك.

    ReplyDelete
  44. This comment has been removed by the author.

    ReplyDelete