Skip to content

Instantly share code, notes, and snippets.

@mleinart
mleinart / carbon-0_9_10-logrotation.patch
Created February 4, 2013 14:44
Patch to Carbon 0.9.10 to support external log rotation
diff --git a/conf/carbon.conf.example b/conf/carbon.conf.example
index 53708a8..7f35e8e 100644
--- a/conf/carbon.conf.example
+++ b/conf/carbon.conf.example
@@ -30,6 +30,9 @@
#
#LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
+# Enable daily log rotation. If disabled, a kill -HUP can be used after a manual rotate
+ENABLE_LOGROTATION = True
#!/usr/bin/env python
"""Launchpad to github bug migration script.
There's a ton of code from Hydrazine copied here:
https://launchpad.net/hydrazine
WARNING: this code was written for the Github issues v2 API, and has *not* been ported to v3. If anyone finds it useful and ports it, please drop me a pull request.
Usage
-----
diff --git a/webapp/graphite/render/glyph.py b/webapp/graphite/render/glyph.py
index 15ceb0d..dadf411 100644
--- a/webapp/graphite/render/glyph.py
+++ b/webapp/graphite/render/glyph.py
@@ -755,6 +755,8 @@ class LineGraph(Graph):
if self.areaMode == 'stacked' and not self.secondYAxis: #TODO Allow stacked area mode with secondYAxis
total = []
for series in self.data:
+ if 'drawAsInfinite' in series.options:
+ continue
diff --git a/webapp/graphite/render/glyph.py b/webapp/graphite/render/glyph.py
index 15ceb0d..23482a7 100644
--- a/webapp/graphite/render/glyph.py
+++ b/webapp/graphite/render/glyph.py
@@ -751,10 +751,22 @@ class LineGraph(Graph):
'bevel' : cairo.LINE_JOIN_BEVEL,
}[linejoin])
+ # check whether there is an stacked metric
+ singleStacked = False
@mleinart
mleinart / graphite-0.9.11.md
Last active December 21, 2015 08:29
Graphite 0.9.11 Release Notes

Changes

graphite-web

Bugs

  • broken nPercentile() and related functions
  • Python 2.4 compatibility in browser endpoint (dcarley)
  • Missing URL parameters in composer load
  • Fix to multiplySeries to return the expected type (nleskiw)
  • Don't blow up when empty series passed to cactiStyle (mattus)
  • Trailing commas in js breaking ie (nleskiw, davecoutts)
  • Remove extra and unnecessary rendering while loading saved graphs (hostedgraphite)
@mleinart
mleinart / write_random.py
Created August 20, 2013 16:41
Script to fill a Graphite Whisper data file with random data for testing purposes
#!/usr/bin/env python
import os
import time
import whisper
import sys
from optparse import OptionParser
from random import Random
SPARSE_SPACING = 5
diff --git a/webapp/graphite/remote_storage.py b/webapp/graphite/remote_storage.py
index b33250f..1f8a578 100644
--- a/webapp/graphite/remote_storage.py
+++ b/webapp/graphite/remote_storage.py
@@ -5,11 +5,7 @@ from urllib import urlencode
from django.core.cache import cache
from django.conf import settings
from graphite.render.hashing import compactHash
-
-try:
diff --git a/webapp/graphite/remote_storage.py b/webapp/graphite/remote_storage.py
index 693e0fd..d51d27c 100644
--- a/webapp/graphite/remote_storage.py
+++ b/webapp/graphite/remote_storage.py
@@ -5,11 +5,7 @@ from urllib import urlencode
from django.core.cache import cache
from django.conf import settings
from graphite.render.hashing import compactHash
-
-try:
diff --git a/webapp/graphite/remote_storage.py b/webapp/graphite/remote_storage.py
index 693e0fd..d51d27c 100644
--- a/webapp/graphite/remote_storage.py
+++ b/webapp/graphite/remote_storage.py
@@ -5,11 +5,7 @@ from urllib import urlencode
from django.core.cache import cache
from django.conf import settings
from graphite.render.hashing import compactHash
-
-try:
@mleinart
mleinart / broccoli_cheddar_soup
Last active November 5, 2016 05:04
Vegetarian Broccoli Cheddar Soup
Ingredients:
2tbsp + 1.5oz (~3tbsp) butter
1.5oz (~1/3 cup) flour
2 medium shallots [1]
6 cups vegetable stock [2]
1 cup milk
8oz heavy cream
8oz yellow cheddar, shredded [3]
2 heads of Broccoli, chopped and tough skin removed from the stalk
1 large carrot cut into matchsticks