go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
804 stars 123 forks source link

Support for tagged metrics in carbonserver #259

Open Quentin-M opened 5 years ago

Quentin-M commented 5 years ago

From https://github.com/lomik/go-carbon/issues/211#issuecomment-425620606:

@lomik What does this include exactly? While I can obviously write tagged metrics, graphite-web never seem to be able to query them back through carbonserver. I don't seem to find any reference to tags in the code path used by /render either. This is a real bummer for us not to be able to use go-carbon in production for the query side, and be forced to use the terribly sluggish graphite-web.

$ echo "local.random.diceroll;sv=backend10 1 `date +%s`" | nc localhost 2002

[2018-09-28T23:22:16.419-0700] DEBUG [whisper:new] created {"path": "data/_tagged/67e/2d4/local_DOT_random_DOT_diceroll;sv=backend10.wsp", "retention": "10s:14d,1m:90d,30m:1y,1h:5y", "schema": "default", "aggregation": "default_average", "xFilesFactor": 0.5, "method": "average"}
$ curl -vv -F "format=json" -F "local=1" -F "noCache=1" -F "from=1536704479" -F "until=1536715279" -F "now=1538197298" -F "target=local.random.diceroll;sv=backend10" "localhost:8080/render/"

[2018-09-28T23:22:28.072-0700] ERROR [access] fetch failed {"handler": "render", "url": "/render/", "peer": "[::1]:60439", "format": "json", "targets": ["local.random.diceroll;sv=backend10"], "runtime_seconds": 0.000586684, "reason": "no metrics found", "http_code": 404}

lstat64("...data/local/random/diceroll;sv=backend10.wsp\0", 0xC4201BED38, 0x0)       = -1 Err#2
lstat64(...data/local/random/diceroll;sv=backend10\0", 0xC4201BEE08, 0x0)        = -1 Err#2
lomik commented 5 years ago

carbonserver is maintained by @Civil

Hipska commented 5 years ago

Is there any progress on this? We would love to use tagged metrics, but it seems not possible when using go-carbon?

Civil commented 5 years ago

Currently you can use go-carbon with graphite-web for tagged metrics. It's not possible to use it with carbonzipper/carbonapi as of now.

The problem with the progress on that is that in all my test environments I have clickhouse with graphite-clickhouse and since about 1y ago I no longer have access to any production environment with graphite (and whisper) and all work on carbonserver currently done by people from Booking.com: @gksinghjsr @bom-d-van @gunnihinn (not sure if I've missed any).

As of me - to be honest that's not the highest priority for me as of now (since about 1y ago) to spend my free time on it. So I cannot provide any reliable estimations about when I'll have time to work on this. But I'll be happy to review and merge any Pull-Requests that will implement that.