graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #00270
Re: [Question #99926]: gaps in graphs when viewing small time frames? Bug or User error?
Question #99926 on Graphite changed:
https://answers.launchpad.net/graphite/+question/99926
Status: Answered => Open
AcidTonic is still having a problem:
Perfect! This is exactly what I wanted. Now I'm glad I asked since I would
have wasted a lot of time hacking around directories.
A few other questions come from your post.
How do i do a STORE.find which will match anything and everything? I tried
using some regex but i kept getting 0 results. *.* would show me the 2nd
level for everything, I just want everything similar to an ls. I found
find_all but it too acts weird and wont show me everything.
Also i wanted to know if there is a similar option to metric.fetch? I want a
way to grab everything. I tried really small/large values hoping to get
everything but it doesnt work. Is there an easy way to get the last X
datapoints? (with a way to get everything I'll just write one if you haven't
already)
This little undocumented api is stunning. Exactly what i was going to
reproduce on my own, now I can get back to my side of the project :)
I am using extjs for my app also, I've wanted to allow my users to craft
their own graphs. Any tips on getting the composer switched to an extjs
fixed sized panel instead of the current window design? I plan to tweak it
and embed it inside my webapp. I'm picking up extjs for this project and
have some basic JSON data grids working, and panels which load fixed sized
graphite graphs.
Of course you'll hear back from me once I'm ready to release any changes I
made to graphite back over for you guys.
Cheers,
Zach
On Thu, Feb 11, 2010 at 5:07 PM, chrismd <
question99926@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Your question #99926 on Graphite changed:
> https://answers.launchpad.net/graphite/+question/99926
>
> Status: Open => Answered
>
> chrismd proposed the following answer:
> Glad to help. If you want to search or navigate the metric hierarchy
> (especially when you have a clustered setup) you could do it locally on
> the graphite server by using the graphite.storage module (I really need
> to document this API, so here's a first stab at it).
>
> bash$ export PYTHONPATH=/opt/graphite/webapp
> bash$ export DJANGO_SETTINGS_MODULE=graphite.settings
> bash$ python
> >>> from django.conf import settings
> >>> import time
> >>> for metric in settings.STORE.find("servers.*.cpuUsage"):
> ... print metric.metric_path # servers.foo.cpuUsage
> ... print metric.fs_path #
> /opt/graphite/storage/whisper/servers/foo/cpuUsage.wsp
> ... print metric.name # cpuUsage
> ... print metric.isLeaf() # True, which means we can fetch() data
> ... (timeInfo, values) metric.fetch(startTime, endTime) # both unix
> epoch times
> ... (start, end, step) = timeInfo
> ... t = start
> ... for value in values:
> ... print time.ctime(), value
> ... t += step
>
> This will work even in a clustered configuration.
>
> If you need to lookup metrics from a remote machine however there is a
> HTTP API as well. Basically you can GET
> /metrics/?query=servers.*.cpuUsage&format=pickle (or format=treejson for
> a JSON object that can be used by an Ext tree). Hope that helps.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/graphite/+question/99926/+confirm?answer_id=10
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/graphite/+question/99926
>
> You received this question notification because you are a direct
> subscriber of the question.
>
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.