ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Data Aggregator Odata API Numerical Formats Inconsistency

book

Article ID: 239941

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

An engineer using Grafana tools reports that it looks like the API is pulling up numbers that are int short and int long, which is causing issues with representation in Grafana.

The engineer reports that when hitting the DX NetOps API for metrics with larger numbers, the API produces the metrics in different formats at times.  The specific metrics I am querying is the ‘im_BitsPerSecond’ portmfs metrics. When the numbers are larger, they are returned in scientific format, and when they are smaller they are returned in standard format. This inconsistency causes issues with automation of these metrics, as you cannot plan for a given format.  Ideally, they would be returned in standard format.

Environment

All supported DX NetOps Performance Management releases

Resolution

For metric values API gets data from vertica as double and serialize to odata2 spec. The definition for Edm.Double from that specification is as follows:

Edm.Double
Represents a floating point number with 15 digits precision that can represent values with approximate range of ± 2.23e -308 through ± 1.79e +308[0-9]+ ((.[0-9]+) | [E[+ | -][0-9]+])dExample 1: 1E+10d Example 2: 2.029d Example 3: 2.0d

More information can be found on the Overview (OData Version 2.0) page.

We do support precision formatting in our odata4 implementation as it's a part of odata4 protocol, which can port the implementation to odata2.

 

Attachments