Page 1 of 1
Units of Measure with REST API GET objects.rrdexport
Posted: Wed Feb 21, 2018 11:09 am
by DFaught
How can I tell what are the units of measure defined for an mrtg service when using the REST API to GET objects.rrdexport for that service? I get the data back but without knowing what the units are, it's not as meaningful.
Thank you for any help you can provide.
Re: Units of Measure with REST API GET objects.rrdexport
Posted: Wed Feb 21, 2018 3:29 pm
by npolovenko
Hello,
@DFaught. Can you show me the output of your query? If you query includes a host then the first paragraph will explain what the values are:
Code: Select all
"legend": {
"entry": [
"rta",
"pl",
"rtmax",
"rtmin"
]
Rta is measured in ms, pl in %, rtmax in ms, rtmin in ms. These units of measure never chnage. I guess if we appended units of measurement in a json response it would be harder to integrate this API with various third-party software. This is just my guess, I might be wrong.
Re: Units of Measure with REST API GET objects.rrdexport
Posted: Thu Feb 22, 2018 1:39 pm
by DFaught
I am querying the history data for a switch port bandwidth service where the units could be kilobits/second, megabits, gigabits, etc. The units can be specified in the Switch-Router Configuration Wizard. Here is the beginning of the response:
Code: Select all
{
"meta": {
"start": "1519146000",
"step": "600",
"end": "1519146000",
"rows": "289",
"columns": "2",
"legend": {
"entry": [
"in",
"out"
]
}
},
"data": {
"row": [
{
"t": "1519146000",
"v": [
"2.1859439939e+01",
"1.4231186011e+01"
]
},
{
"t": "1519146600",
"v": [
"2.2410746002e+01",
"1.5672900275e+01"
]
},
...
Re: Units of Measure with REST API GET objects.rrdexport
Posted: Thu Feb 22, 2018 5:53 pm
by npolovenko
@DFaught, I think they're not including measurement units for third-party integration purposes. Also, you should be able to see measurement units on the actual graph in GUI.
With that said, I can see your point as well. I can submit a feature request on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team.