Project

General

Profile

Feature #25912

stats.get_data support batch queries in one API call

Added by Peter Southwell about 3 years ago. Updated about 3 years ago.

Status:
Closed: Behaves correctly
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Feature request:

Need an API that will get one or more dataset/series in one api call. Is there a way to do this?

in the docs (they're docs) https://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html

I notice this:

graph
Create a graph from data stored in one or several RRDs. Apart from generating graphs, data can also be extracted to stdout. Check rrdgraph.

I believe the current is using the fetch (the FreeNas API stats.get_data)

fetch
Get data for a certain time period from a RRD. The graph function uses fetch to retrieve its data from an RRD. Check rrdfetch.

Totally fine... But id like to get all the data sets for one chart in one call..

For example...instead of one object per query.. i.e.

{'source': 'aggregation-cpu-sum',
'type': 'cpu-user',
'dataset': 'value'
}

It'd take an array of quereies.. And return them all.. In one message.

For example.... For the entire CPU chart.. Id pass the API:

[ {
'source': 'aggregation-cpu-sum',
'type': 'cpu-user',
'dataset': 'value'
}, {
'source': 'aggregation-cpu-sum',
'type': 'cpu-interrupt',
'dataset': 'value'
}, {
'source': 'aggregation-cpu-sum',
'type': 'cpu-system',
'dataset': 'value'
}, {
'source': 'aggregation-cpu-sum',
'type': 'cpu-idle',
'dataset': 'value'
}, {
'source': 'aggregation-cpu-sum',
'type': 'cpu-nice',
'dataset': 'value'
},
]
Otherwise.. The UI must assemble each data point seperately.. super heavy on a page for example showing all the disks.. Or all the size for each existing mount.

Or.. Is there maybe a way I didn't see that does this now?

History

#1 Updated by William Grzybowski about 3 years ago

  • Status changed from Unscreened to Closed: Behaves correctly

Thats how it currently it works, you pass a list of sources, not a single object.

Also available in: Atom PDF