Stat Panel Result of Division showing NaN?

  • What are you trying to achieve?
    A percentage of uptime based on a response to a ping @ :22

  • How are you trying to achieve it?
    I’m using the [[inputs.net_response]] plugin to see a servers uptime. I’m sending a tcp ping at :22 and using the response from that.

I’ve formed 2 queries,
count of result code where the result is “success”
count of result code where the result is anything
divide success/all using the transform panel

  • What happened?
    if I divide success/all i should receive a percentage of successful results. However, I receive NaN as the result of the divison. The number of successful / total queries is correct - 6 hour time frame * 60 minutes * 10s interval = 2160 entries.

  • What did you expect to happen?
    I would expect that the division would return “1” which I could then turn into a percentage.

How and where are you doing this calculation?

I think the result in string…
Before calculation, please convert the result first to number in the transformation, then do the calculation.


I wasn’t aware of the convert field type before - is this what you’re referring to? I’m still getting NaN after converting to Numeric.

The calculation is happening in the transform tab - see the screenshot in the other reply I just tossed in.

1 Like

what if you tried this approach? I am mocking your data using ms sql with mixed data source and the 3rd data source is an expression