sasaki77 / archiverappliance-datasource

EPICS Archiver Appliance plugin for Grafana dashboard
https://sasaki77.github.io/archiverappliance-datasource
MIT License
14 stars 7 forks source link

Handling Severity of PVs #156

Open sasaki77 opened 1 year ago

sasaki77 commented 1 year ago

Discussed in https://github.com/sasaki77/archiverappliance-datasource/discussions/155

Originally posted by **LowriJenkins** August 23, 2023 Is there a way to make use of the severity of the PVs being used in this? The data retrieved from getData on the archiver itself does contain the severity of the PVs, and it would be helpful to be able to manipulate the data e.g. if the severity is invalid, returning null so that the graph does not display values when it was in an invalid state. I have found a way to achieve the above, but it's very hacky, and relies on having another PV scan the severities in question and archiving that PV. thanks for any help.
sasaki77 commented 1 year ago

the plugin uses the getData.qw format instead of the getData.json format. That's because getData.qw has waveform metadata and the millisecs time format. Those are convenient for the plugin. The getData.qw format doesn't have severity meta data. If we want to handle severity, the plugin should be migrated to use the getData.json format.

The source code for the getData.qw format says that please don't use this for integration purpose.

https://github.com/slacmshankar/epicsarchiverap/blob/9aeb9b536749805dccd5abc19a9709d6b505bcd2/src/main/org/epics/archiverappliance/retrieval/mimeresponses/QWResponse.java

When I have a chance to migrate to the getData.json format, I'll consider to handle the severity.

greyghost509 commented 3 weeks ago

I would like to see this feature, too. It would be great to be able to add some kind of information to dashboards that informs the user about the validity of the data.