Is there a way to graph Strings or display prefix/suffix for numbers?

Started by Millenium7, December 20, 2018, 08:39:30 AM

Previous topic - Next topic

Millenium7

I have plenty of OID's that are polled with numeric status codes i.e. Duplex 0=half 1=full and I like to use transformation to make this easier for people to read at a glance. So i'll set the value to String and use DCI transformation to say "Half" or "Full" instead of just 0/1.

The problem though is I lose the ability to graph. Graphs are super handy to spot changes over a broad period of time. If I leave it as an integer then I can just graph it, set period to a month and instantly see if the link if ever went into half duplex mode. Really hard when it's a string because I have to look at the DCI distory and try and spot a change in the list of thousands of poll entries

I'm sure there's a way to do this specifically for the 'Duplex' status but I have plenty of others i.e. GPS sync status that can have 6 different codes. Nobody is going to memorize what each code is. I do write them in the comments field of each DCI but it's several more steps to look this up

What i'd like is for when just looking at the objects 'last values' area it could show something in human readable text, but is still an integer in the database so it can graph it

Tursiops

We're doing similar things and I agree that this would be a great feature in such scenarios: a "live" transform as data is read from the database, not before it is written to it. An alternative could be to have a way to show the comment part in/on the graph so you can see which value represents what.

Either way, for all I know right now that's not possible without doubling up on DCIs, i.e. creating a second DCI based on the first one. The first one is integer only, the second transforms the value into a string. That way you have both: string and integer history.

Millenium7

Quote from: Tursiops on December 20, 2018, 11:16:57 PM
Either way, for all I know right now that's not possible without doubling up on DCIs, i.e. creating a second DCI based on the first one. The first one is integer only, the second transforms the value into a string. That way you have both: string and integer history.

While not great, that would work if there's a way to segregate them, i.e. hiding one of the DCI's from the 'last values' view (probably not the best method) or i.e. changing its colour/status/something so it's obvious that this is for data logging, not for human reading. And sits down the bottom of the list not somewhere in the middle

Victor Kirhenshtein

Hi,

some kind of "display transformation" seems to be needed. Also, in 3.0 raw value stored in history tables along with transformed value, so adding option to create graph on raw value can help as well. I've created feature requests for all options:

https://track.radensolutions.com/issue/NX-1537
https://track.radensolutions.com/issue/NX-1538
https://track.radensolutions.com/issue/NX-1539

Best regards,
Victor

Millenium7


Victor Kirhenshtein

Somewhere mid-year I suppose, with first milestone release somewhere in February. We have lot of plans for 3.0 and many are still pending.

Best regards,
Victor

troffasky

What would be useful when reviewing items would be to collapse them into a "changed" view, so instead of showing [I have exported to CSV and pasted here, just imagine I'm talking about the GUI] every value:

"Timestamp","Value"
"2019.02.16 18:09:25","0"
"2019.02.16 18:08:25","0"
"2019.02.16 18:07:25","1"
"2019.02.16 18:06:25","0"
"2019.02.16 18:05:25","0"
"2019.02.16 18:04:25","0"
"2019.02.16 18:03:25","0"
"2019.02.16 18:02:25","1"
"2019.02.16 18:01:25","0"
"2019.02.16 18:00:25","0"


Show the points at which the values transition:

"Timestamp","Value"
"2019.02.16 18:08:25","Changed from 1 to 0"
"2019.02.16 18:07:25","Changed from 0 to 1"
"2019.02.16 18:03:25","Changed from 1 to 0"
"2019.02.16 18:02:25","Changed from 0 to 1"


For items that change frequently, not much space in the GUI would be saved, but for items that change less frequently, it would give a much more concise overview. I don't know what name you would give this display mode, but I suspect you could use an algorithm to decide when to use it to display a data series [eg, if less than 5% datapoints are different than when previously polled, collapse them].

Millenium7

I see that NX-1537 (Hide value from 'last values' page) was added in 2.2.14 under 'other options' for a DCI. That's very handy, thank you!  :D
So now a viable workaround is possible by creating 2 DCI's. But would still be great if we can make this a bit cleaner with one of the other methods NX-1538 or NX-1539

I see that 1539 is implemented in version 3.0. Any ETA on when this is going to be available?

Victor Kirhenshtein

We have a mid-June deadline, so should be soon.

Best regards,
Victor