Question #108329 on Graphite changed:
https://answers.launchpad.net/graphite/+question/108329
Tamale gave more information on the question:
here's my attempt. in graphite/metrics/urls.py, I added another url
handler, 'grep', and in graphite/metrics/views.py, I added these lines
starting at line 112:
def grep_view(request):
"Josh's attempt to make a search function that looks through all metrics"
profile = getProfile(request)
contexts = int( request.REQUEST.get('contexts', 0) )
wildcards = int( request.REQUEST.get('wildcards', 0) )
try:
query = str( request.REQUEST['query'] )
except:
return HttpResponseBadRequest(content="Missing required parameter 'query'",
mimetype="text/plain")
store = settings.STORE
matches = list( store.find(query) )
matches.sort(key=lambda node: node.name)
content = json.dump(matches)
content = matches
response = HttpResponse(content, mimetype='text/json')
return response
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.
_______________________________________________
Mailing list: https://launchpad.net/~graphite-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~graphite-dev
More help : https://help.launchpad.net/ListHelp