On 26/08/11 2:04 AM, Duncan Mackintosh wrote: > Cheers Craig, that's about what I was assuming was the case to be honest. > The hardest thing I've found to try and get out of REST was 'node availability > over last X days' - the db function that calculates this looks at sum(outages)/count(managed services), > the latter of which isn't something you can fetch in bulk over REST as it's in the form > rest/nodes/<node criteria>/ipinterfaces/. I *could* expose a list of all ip interfaces through > REST, though I'm not sure if that's creeping too far. Your thoughts?
Well, I see that as an attribute of a node. BUT, given the likely calculation cost (not hideous, but definitely non-trivial) *and* that it is over a variable number of days, I'd see it as better exposed via another sub resource of node, e.g.: /nodes/{id}/availability?hours=X (with various options for specifying the time period. Any one of hours, minutes, seconds, days, weeks, months and years should give clients sufficient options :)) It's only a GETtable resource, and I think it's quite justifiably a separate resource because "availability" is a major and well known metric. Exposing it this way would be rather cool IMHO as it's getting beyond just the basic data model, and into exposing the deeper information stored/created by OpenNMS. There is possibly a case for creating a /node/{id}/metrics/<foo> hierarchy (where "availability" is the first of the possible <foo>) but I suspect it's too early for that (we need to see what other metrics, if any, need to be exposed before doing that, lest we end up with a lonesome single metric in a tree by itself :)). Craig ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel