Skip to content

getData endpoint truncates PV names and returns incorrect values #202

Description

@OscarFueGo

Hi, first of all, thank you for this plugin. It is awesome!

Issue Description

I noticed the plugin uses the getData Archiver Appliance endpoint; apparently, this endpoint does not handle channel names very well.

Here's a REQ/RES example, the channel name is truncated in the dot . and the values do not correspond to the .VALB channel

REQ:
http://localhost:17665/retrieval/data/getData.json?pv=firstFill(channel:example.VALB)&from=2025-07-28T22:32:30.470Z&to=2025-07-28T22:50:30.470Z&fetchLatestMetadata=true
RES:
[ 
{ "meta": { "name": "channel:example" , "DRVH": "0.0" , "HIGH": "0.0" , "HIHI": "0.0" , "DRVL": "0.0" , "PREC": "0.0" , "LOW": "0.0" , "LOLO": "0.0" , "LOPR": "0.0" , "HOPR": "0.0" , "NELM": "1" , "DESC": "" },
"data": [ 
{ "secs": 1753741350, "val": 0, "nanos": 0, "severity":0, "status":0 },
{ "secs": 1753742250, "val": 0, "nanos": 0, "severity":0, "status":0 },
{ "secs": 1753743150, "val": 0, "nanos": 0, "severity":0, "status":0 }
] }
 ]

Expected behavior

There's another endpoint available, getDataForPVs, that seems to retrieve the data correctly.

REQ:
http://localhost:17665/retrieval/data/getDataForPVs.json?pv=firstFill(channel:example.VALB)&from=2025-07-28T22:32:30.470Z&to=2025-07-28T22:50:30.470Z&fetchLatestMetadata=true
RES:
[ 
{ "meta": { "name": "channel:example.VALB" , "DRVH": "0.0" , "HIGH": "0.0" , "HIHI": "0.0" , "DRVL": "0.0" , "PREC": "0.0" , "LOW": "0.0" , "LOLO": "0.0" , "LOPR": "0.0" , "HOPR": "0.0" , "NELM": "1" , "DESC": "" },
"data": [ 
{ "secs": 1753741350, "val": 1, "nanos": 0, "severity":0, "status":0 },
{ "secs": 1753742250, "val": 1, "nanos": 0, "severity":0, "status":0 },
{ "secs": 1753743150, "val": 1, "nanos": 0, "severity":0, "status":0 }
] }
 ]

To Reproduce
Steps to reproduce the behavior:

  1. Identify a channel that has a dot in the name
  2. Query data for a channel using getData endpoint
  3. Query data for the same params but using getDataForPVs endpoint
  4. Compare responses

Software versions

Software Version
Grafana 12.0.0
Archiver Appliance 2.0.10
Archiver Appliance datasource plugin 2.0.2

Note
I'm aware this is indeed a bug in Archiver Appliance, but I wonder if it would be possible to add support for the getDataForPVs endpoint (or allow it to be configured as an option), since this endpoint is already implemented.

I was able to work around the issue by modifying module.js in Grafana, but this doesn't solve the problem for alerting.

Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions