>>> On 12/5/2011 at 12:09 PM, in message <20111205190901.go17...@mail.nih.gov>, Jesse Becker <becker...@mail.nih.gov> wrote: > On Mon, Dec 05, 2011 at 01:17:19PM -0500, Brad Nicholes wrote: >>All, >> I just wanted to get some feedback on how much interest there would be > for a REST interface for Ganglia. I spent a few days putting together a POC > of a REST interface and was able to get something that implements the > following REST URLs: >> >>/clusters >>/clusters/{cid} >>/clusters/{cid}/hosts >>/hosts >>/hosts/{hid} >>/hosts/{hid}/metrics >>/hosts/{hid}/metrics/{mid} >>/hosts/{hid}/metrics/{mid}/data >>/hosts/{hid}/metrics/{mid}/graph >>/hosts/{hid}/metrics/{mid}/info > > For [chm]id, what is considered valid? Are the "common" names of these > valid, or do we have use some sort of unique ID instead? >
As it stands right now, the identifier is just the common name found in the XML. We would need to do something else in gmond like we have talked about before (something like a GUID) in order to change this. But since the URL itself qualifies the resource uniquely, common names shouldn't be a problem. > It's certainly a good idea I think, and could be used to simplify a lot > of the frontend UI code. > > For things like '/hosts/{hid}/metrics/{mid}/graph', how would various > graphing options be passed? I have taken a very simplistic approach for now. A graphing URL would like something like /hosts/foo.org/metrics/cpu_user/graph?from=now-2day&to=now-1day&title="cpu user"&vlabel="percentage"&arealabel="cpu" Obviously there are many more graphing options than these that are defined in rrdtool. We would just need to figure out the best way to expose them. Options like CDEFs and VDEFs might be interesting. Then there are the stacked graphs. I'm not sure how to handle that. But if it can be expressed on a command line, we should be able to figure out how to express it in REST. > > For /hosts/{hid}/metrics/{mid}/data, could that be expanded to return > LAST, MIN,MAX, AVERAGE (etc) values as well? > > Absolutely, it would just be a matter of defining more query parameters Brad ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers