criteo / biggraphite

Simple Scalable Time Series Database
Apache License 2.0
130 stars 36 forks source link

issues graphite 1.1.5 and "local" finder #506

Open Roguelazer opened 5 years ago

Roguelazer commented 5 years ago

The biggraphite graphite finder is marked as non-local (with the class attribute local=False); as of graphite 1.1.5, if you're using graphite in clustered mode, the frontend sends the local=1 parameter on remote find requests and thus can't ever see anything from biggraphite.

Practically, this means that when I upgraded my frontends from 1.1.4 to 1.1.5, they stopped seeing biggraphite data. I applied the following patch to fix it:

diff --git a/biggraphite/plugins/graphite.py b/biggraphite/plugins/graphite.py
index e5d6c1a..d8821be 100755
--- a/biggraphite/plugins/graphite.py
+++ b/biggraphite/plugins/graphite.py
@@ -261,7 +261,7 @@ class Reader(BaseReader):
 class Finder(BaseFinder):
     """Finder plugin for BigGraphite."""

-    local = False
+    local = True

     def __init__(
         self, directories=None, accessor=None, metadata_cache=None, carbonlink=None

I actually can't find where in the 1.1.4 to 1.1.5 transition the local=1 flag started getting set, but it worked before and doesn't work now, so shrug.

If you're curious, the architecture looks something like

untitled

adriengentil commented 5 years ago

Hello,

Thanks for your report. I'll take a look in the coming days.

Adrien

david-guenault commented 5 years ago

Not sure this is the same problem, but we found that it was impossible to "federate" two graphite clusters with graphite web because of local=1. The only workaround was to modify code in graphite web the following way.

iksaif commented 5 years ago

Could you send a PR ?

david-guenault commented 5 years ago

No the modification is only for graphite part. So out of scope for biggraphite. Sorry