Skip to content

Instantly share code, notes, and snippets.

@zzzhc
Forked from relaxdiego/graphite.md
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save zzzhc/e2f84ba9b91f9bd9a755 to your computer and use it in GitHub Desktop.

Select an option

Save zzzhc/e2f84ba9b91f9bd9a755 to your computer and use it in GitHub Desktop.

Revisions

  1. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -74,6 +74,13 @@ Check the debug output here:
    http://localhost:8080/render
    ```

    # Optional convenience aliases
    Add this to your .bashrc or .bash_profile:
    ```
    alias carbon='python /opt/graphite/bin/carbon-cache.py'
    alias graphite-web='python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite'
    ```


    # Additional resources
    - http://graphite.wikidot.com/installation
  2. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Follow these steps to install graphite on OS X Mavericks.

    # Install dependencies

    ## Install Cair and friends
    ## Install Cairo and friends
    ``` bash
    brew install cairo
    brew install py2cairo
  3. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,15 @@
    Follow these steps to install graphite on OS X Mavericks.

    # Prerequisites
    - Homebrew
    - Python 2.7
    - Brew
    - Git

    # Install dependencies

    ## Install Cairo
    ## Install Cair and friends
    ``` bash
    brew install cairo
    ```

    ## Install py2cairo
    ``` bash
    brew install py2cairo
    ```

  4. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Follow these steps to install graphite on OS X Lion.
    Follow these steps to install graphite on OS X Mavericks.

    # Prerequisites
    - Python 2.7
  5. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ brew install py2cairo

    ## Install Django
    ``` bash
    pip install django
    pip install Django==1.5
    pip install django-tagging
    ```

  6. @relaxdiego relaxdiego revised this gist Nov 19, 2013. 1 changed file with 6 additions and 24 deletions.
    30 changes: 6 additions & 24 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -13,29 +13,8 @@ brew install cairo
    ```

    ## Install py2cairo

    Clone the repo:
    ``` bash
    git clone git://git.cairographics.org/git/py2cairo
    cd py2cairo
    ```

    We need to set up a bunch of environment variables:
    ``` bash
    export PYTHONPATH='/System/Library/Frameworks/Python.framework/Versions/2.7'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$PYTHONPATH/lib/:$LD_LIBRARY_PATH'
    export LINKFLAGS='-search_dylibs_first -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/'
    export ARCHFLAGS='-arch x86_64'
    export CC='/usr/bin/gcc'
    export PKG_CONFIG_PATH='/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/'
    ```

    Then we can proceed with the installation:
    ``` bash
    python waf clean
    python waf configure --prefix=$PYTHONPATH
    python waf build
    python waf install
    brew install py2cairo
    ```

    ## Install Django
    @@ -46,9 +25,12 @@ pip install django-tagging

    # Install Graphite
    ``` bash
    pip install carbon
    sudo pip install carbon
    pip install whisper
    pip install graphite-web
    sudo pip install graphite-web
    sudo pip install Twisted==11.1.0

    sudo chown -R <your username>:staff /opt/graphite
    ```

    # Configure graphite
  7. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ python /opt/graphite/bin/carbon-cache.py start

    # Start Graphite
    ``` bash
    python ./opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
    python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
    ```

    # Hope that it works!
  8. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -70,12 +70,12 @@ python manage.py syncdb

    # Start carbon
    ``` bash
    python ./bin/carbon-cache.py start
    python /opt/graphite/bin/carbon-cache.py start
    ```

    # Start Graphite
    ``` bash
    python ./bin/run-graphite-devel-server.py /opt/graphite
    python ./opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
    ```

    # Hope that it works!
  9. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -55,18 +55,14 @@ pip install graphite-web
    ``` bash
    cp /opt/graphite/conf/carbon.conf{.example,}
    cp /opt/graphite/conf/storage-schemas.conf{.example,}

    # Modify this file to change database backend (default is sqlite).
    cp /opt/graphite/webapp/graphite/local_settings.py{.example,}

    ```

    # Create default database
    ``` bash
    cd /opt/graphite/webapp/graphite

    # The default DB backend is sqlite. To configure a different
    # backend, modify the `local_settings.py` file.
    # Modify this file to change database backend (default is sqlite).
    cp local_settings.py{.example,}

    # Initialize database
    python manage.py syncdb
  10. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -55,6 +55,10 @@ pip install graphite-web
    ``` bash
    cp /opt/graphite/conf/carbon.conf{.example,}
    cp /opt/graphite/conf/storage-schemas.conf{.example,}

    # Modify this file to change database backend (default is sqlite).
    cp /opt/graphite/webapp/graphite/local_settings.py{.example,}

    ```

    # Create default database
  11. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -86,6 +86,7 @@ http://localhost:8080
    ```

    You should see this if it works properly:

    ![bacon](http://i.imgur.com/XF5lz.png)

    If you get a broken image, it most likely means that something is wrong py2cairo and cairo.
  12. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 2 additions and 9 deletions.
    11 changes: 2 additions & 9 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -53,15 +53,8 @@ pip install graphite-web

    # Configure graphite
    ``` bash
    cd /opt/graphite/conf

    # Reorganize example configs
    mkdir examples
    mv * examples

    # Use some default configs
    cp examples/storage-schemas.conf.example storage-schemas.conf
    cp examples/carbon.conf.example carbon.conf
    cp /opt/graphite/conf/carbon.conf{.example,}
    cp /opt/graphite/conf/storage-schemas.conf{.example,}
    ```

    # Create default database
  13. @surjikal surjikal revised this gist May 17, 2012. No changes.
  14. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    Follow these steps to install graphite on OS X Lion.

    # Prerequisites
    - Python 2.7
    - Brew
  15. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -86,15 +86,19 @@ python ./bin/run-graphite-devel-server.py /opt/graphite
    # Hope that it works!

    Go to:
    ```
    http://localhost:8080
    ```

    You should see this if it works properly:
    ![bacon](http://i.imgur.com/XF5lz.png)

    If you get a broken image, it most likely means that something is wrong py2cairo and cairo.

    Check the debug output here:
    (http://localhost:8080/render)
    ```
    http://localhost:8080/render
    ```


    # Additional resources
  16. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -94,7 +94,7 @@ You should see this if it works properly:
    If you get a broken image, it most likely means that something is wrong py2cairo and cairo.

    Check the debug output here:
    http://localhost:8080/render
    (http://localhost:8080/render)


    # Additional resources
  17. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -85,12 +85,16 @@ python ./bin/run-graphite-devel-server.py /opt/graphite

    # Hope that it works!

    Go to: http://localhost:8080
    Go to:
    http://localhost:8080

    You should see this if it works properly:
    ![bacon](http://i.imgur.com/XF5lz.png)

    If you get a broken image, it most likely means that something is wrong py2cairo and cairo. Got to http://localhost:8080/render to see the debug output.
    If you get a broken image, it most likely means that something is wrong py2cairo and cairo.

    Check the debug output here:
    http://localhost:8080/render


    # Additional resources
  18. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -84,14 +84,13 @@ python ./bin/run-graphite-devel-server.py /opt/graphite
    ```

    # Hope that it works!
    ``` bash
    http://localhost:8080
    ```

    You should see this if its working correctly:
    Go to: http://localhost:8080

    You should see this if it works properly:
    ![bacon](http://i.imgur.com/XF5lz.png)

    Otherwise, you will get a broken image. This means that something is probably wrong py2cairo and cairo. Got to [http://localhost:8080/render] to see.
    If you get a broken image, it most likely means that something is wrong py2cairo and cairo. Got to http://localhost:8080/render to see the debug output.


    # Additional resources
  19. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -91,7 +91,7 @@ http://localhost:8080
    You should see this if its working correctly:
    ![bacon](http://i.imgur.com/XF5lz.png)

    Otherwise, you will get a broken image. This means that something is probably wrong py2cairo and cairo. Got to _http://localhost:8080_
    Otherwise, you will get a broken image. This means that something is probably wrong py2cairo and cairo. Got to [http://localhost:8080/render] to see.


    # Additional resources
  20. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,6 @@
    brew install cairo
    ```

    ![bacon](http://i.imgur.com/XF5lz.png)

    ## Install py2cairo

    Clone the repo:
    @@ -90,9 +88,10 @@ python ./bin/run-graphite-devel-server.py /opt/graphite
    http://localhost:8080
    ```

    If it works correctly, you should see a black image with "No Data" in the Graphite Composer.
    You should see this if its working correctly:
    ![bacon](http://i.imgur.com/XF5lz.png)

    If you see a broken image, it's probably something to do with py2cairo and cairo.
    Otherwise, you will get a broken image. This means that something is probably wrong py2cairo and cairo. Got to _http://localhost:8080_


    # Additional resources
  21. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,8 @@
    brew install cairo
    ```

    ![bacon](http://i.imgur.com/XF5lz.png)

    ## Install py2cairo

    Clone the repo:
  22. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Prerequisites
    - Python 2.7
    - Brew
    - Git

    # Install dependencies

  23. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # Prerequisites
    - Python 2.7
    - Brew

    # Install dependencies

  24. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Prerequisites
    - Python 2.7

    # Install dependencies

    ## Install Cairo
  25. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -75,7 +75,7 @@ python ./bin/carbon-cache.py start

    # Start Graphite
    ``` bash
    python /usr/local/share/python/run-graphite-devel-server.py /opt/graphite
    python ./bin/run-graphite-devel-server.py /opt/graphite
    ```

    # Hope that it works!
  26. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ cd py2cairo
    We need to set up a bunch of environment variables:
    ``` bash
    export PYTHONPATH='/System/Library/Frameworks/Python.framework/Versions/2.7'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$PYTHONPATH/lib:$LD_LIBRARY_PATH'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$PYTHONPATH/lib/:$LD_LIBRARY_PATH'
    export LINKFLAGS='-search_dylibs_first -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/'
    export ARCHFLAGS='-arch x86_64'
    export CC='/usr/bin/gcc'
  27. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,7 @@ cd py2cairo
    We need to set up a bunch of environment variables:
    ``` bash
    export PYTHONPATH='/System/Library/Frameworks/Python.framework/Versions/2.7'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$LD_LIBRARY_PATH'
    export LD_LIBRARY_PATH='$PYTHONPATH/lib:$LD_LIBRARY_PATH'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$PYTHONPATH/lib:$LD_LIBRARY_PATH'
    export LINKFLAGS='-search_dylibs_first -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/'
    export ARCHFLAGS='-arch x86_64'
    export CC='/usr/bin/gcc'
  28. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,11 @@ brew install cairo
    ```

    ## Install py2cairo

    Clone the repo:
    ``` bash
    # Clone the repo
    git clone git://git.cairographics.org/git/py2cairo
    cd py2cairo
    ```

    We need to set up a bunch of environment variables:
    @@ -22,7 +24,7 @@ export CC='/usr/bin/gcc'
    export PKG_CONFIG_PATH='/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/'
    ```

    Then we can proceed with the installation
    Then we can proceed with the installation:
    ``` bash
    python waf clean
    python waf configure --prefix=$PYTHONPATH
  29. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions graphite.md
    Original file line number Diff line number Diff line change
    @@ -7,20 +7,24 @@ brew install cairo

    ## Install py2cairo
    ``` bash
    # Clone the repo
    git clone git://git.cairographics.org/git/py2cairo
    ```

    cd py2cairo

    python waf clean

    We need to set up a bunch of environment variables:
    ``` bash
    export PYTHONPATH='/System/Library/Frameworks/Python.framework/Versions/2.7'
    export LD_LIBRARY_PATH='$PYTHONPATH/:$LD_LIBRARY_PATH'
    export LD_LIBRARY_PATH='$PYTHONPATH/lib:$LD_LIBRARY_PATH'
    export LINKFLAGS='-search_dylibs_first -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/'
    export ARCHFLAGS='-arch x86_64'
    export CC='/usr/bin/gcc'
    export PKG_CONFIG_PATH='/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/'
    ```

    Then we can proceed with the installation
    ``` bash
    python waf clean
    python waf configure --prefix=$PYTHONPATH
    python waf build
    python waf install
  30. @surjikal surjikal revised this gist May 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion graphite.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    # Install dependencies

    ## Install Cairo
    @@ -9,6 +8,7 @@ brew install cairo
    ## Install py2cairo
    ``` bash
    git clone git://git.cairographics.org/git/py2cairo

    cd py2cairo

    python waf clean