Running Graphite on Windows

December 9, 2012, with 21 comments
by admin

As mentioned in my previous post, I discovered the Graphite monitoring system and ported it to Windows. That wasn’t as difficult as I initially thought so I’ll explain the steps in detail in this and more upcoming posts so that everyone interested can follow the guide easily.

I got good hints and help from Ron Cordell from Relay Health who previously ported Graphite to Windows in a similar fashion. Thanks a lot, Ron!

Prerequisites for running Graphite are:

  • install Python (in my case: latest release of version 2.7)
  • install pypi/ setuptools (download here)

I forked the official carbon from github and inserted the changes I made. You find the fork here:

There are some steps that you need to perform in order to successfully run Graphite on Windows:

  1. Download Carbon (here)
  2. Download Whisper (here)
  3. Download Graphite-web (here)
  4. Install Whisper using install
    It goes into the Python libs/site-packages directory
  5. Change the path in Carbon’s setup.cfg to a Windows path. In my case:
    prefix = d:\graphite
  6. Run install
  7. Change local data directory setting: open conf/carbon.conf and change LOCAL_DATA_DIR. Alternatively, you can set following environment variables as specified in carbon.conf file:

After committing my changes into the branch, I issued a pull request and hope that it will be approved.

If you find anything not to be working, please let me know.

The second article will cover the Graphite-webapp. This app runs on Windows without any code change but requires some additional packages to be installed.

Aktualisiert am February 14, 2013

Keine Kommentare

  1. Hi,
    I’m trying to install Graphite into Windows Server 2012. I have downloaded and installed Python version 3.3.0, but when you say “install pypi (download here)”, the link sends to me to a page with a big list of packages, and I don’t know which packages I should get. Please, could you say me which of them I have to install?, or what do I should install?

    thank you very much,

    Carlos Coronel

  2. Carlos,
    which version of the setuptools did you install? I don’t see a listing for python 3.x

  3. hi,
    I am working on the windows process of shinken (monitoring tool based on python and using the nagios conf files). My goal is to provide setups for windows to use shinken. I have some request to install graphite on windows to use it with shinken. Is it possible for me to package your graphite installation into a setup.exe file and put it into the windows shinken setup (i think as an external setup.exe to check and trace the installations)? It will be easier for a lot of windows users to launch a setup.exe than make 3 githubs and other handmade modifications. Of course, i will not change the licence and put a reference of your work and website. Shinken is deliver with AGPL licence.

    Let me know if you want more explanations, or if you have some questions.

    Jean-Francois BUTKIEWICZ
    Veosoft, France

    • Hi Jean-Francois,

      unfortunately, my experience with setup generators is limited. I understand the concern that one has to checkout a couple of github repositories but on the otherhand this gives you always an up-to-date version of the application. It would probably be easier to write a small python script that checks out the projects and then modifies the configuration files as required. So more or less a



  4. Hi,
    I follow the steps you described and got an error while start carbon. May I know how did you resolve this error because it seems that there is not a pwd module on windows? Thanks.

    D:\system\graphite\Scripts> start
    Traceback (most recent call last):
    File “D:\system\graphite\Scripts\”, line 28, in
    from carbon.util import run_twistd_plugin
    File “D:\system\graphite\lib\carbon\”, line 3, in
    import pwd
    ImportError: No module named pwd

    Paxson Yang

  5. Hi Stephen,

    I’ve followed exactly all the step you provided.
    And got the same error as Paxson Yang. And it was definitely a version from (and whsiper and graphite-web I also grabbed from

    To be more exact:

    c:\carbon\Scripts> start
    Traceback (most recent call last):
    File “C:\carbon\Scripts\”, line 28, in
    from carbon.util import run_twistd_plugin
    File “C:\carbon\lib\carbon\”, line 17, in
    from twisted.python.util import initgroups
    ImportError: No module named twisted.python.util


    Could you please suggest how to solve this?

  6. according to the error message, you are missing the twisted library.
    Please refer to the second post:

    on how to install the dependencies for the web frontend.

  7. Hi Stephan,

    Thanks for the great article. It’s been very helpful as I have Graphite running on a Raspberry Pi but I want to transfer it across to a Windows machine so I can use the Pi in a robot project 🙂

    I’ve got the carbon and webapp running ok but the metrics are appearing in the browser with a slash in the path. So instead of ‘carbon’ and a sub branch of ‘agents’ I get ‘carbon\agents’.

    It must be due to the Windows backslash but you didn’t have a problem so is it a conf issue?

    Thanks for any help you can provide.

    • Hi Rob,

      Unfortunately I haven’t a Graphite installation running currently so I can’t confirm this. Sorry for that. Imho, it would make sense to search for ‘pathsep’ in the code and replace it by ‘/’.



  8. When I run the whisper and carbon installs, I get syntax errors anywhere that looks like this:

    except whisper.InvalidConfiguration, e:

    If the except has a comma and e after it, that is bad syntax. Not being a Python person, I have no idea how to fix this. I’m using Python 3.3. Do I need to back-level to 2.7?

  9. I get an error like this
    Traceback (most recent call last):
    File “”, line 96, in
    File “C:\Python27\lib\distutils\”, line 152, in setup
    File “C:\Python27\lib\distutils\”, line 953, in run_commands
    File “C:\Python27\lib\distutils\”, line 971, in run_command
    File “C:\Python27\lib\distutils\”, line 109, in ensure_finalized
    File “C:\Python27\lib\distutils\command\”, line 353, in finalize_opt
    ‘userbase’, ‘usersite’)
    File “C:\Python27\lib\distutils\command\”, line 504, in convert_path
    setattr(self, attr, convert_path(getattr(self, attr)))
    File “C:\Python27\lib\distutils\”, line 124, in convert_path
    raise ValueError, “path ‘%s’ cannot be absolute” % pathname
    ValueError: path ‘/opt/graphite/webapp’ cannot be absolute

  10. Hello, i can’t find the specified file in my system: conf/carbon.conf
    There’s another file in this directory. It’s conf/carbon.conf.example should I modify this last?

  11. I cannot install carbon package, I modified setup.cfg to local path and then I run install that show below message

    C:\Work\git\carbon> install
    C:\Work\Python27\Lib\distutils\ UserWarning: Unknown distribution option: ‘install_requires’
    running install ………..

    And I check by pip list that doesn’t have carbon package in list.

    Please advise me.

  12. Hi Stephan,
    is anything changed from the time you posted the Graphite installation on Windows guide?
    I ran Windows 7, with Anaconda Python (very new installation), and I run into errors when installing Carbon and then Graphite web.

    Can you help me there?

    Thank you in advance,

Schreibe einen Kommentar

Kommentar absenden >>