# Weird averaging operation being applied to data when incoming queried data value changes

**URL:** <https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913>\
**Category:** Grafana\
**Created:** [November 5, 2021, 3:57pm UTC](https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913 "2021-11-05T15:57:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cidr](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cidr](https://community.grafana.com/u/cidr)\
**Post date:** [November 5, 2021, 3:57pm UTC](https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913/1 "2021-11-05T15:57:16Z")

</div>

- What Grafana version and what operating system are you using?  
Grafana version is v8.1.5 and is running on an Ubuntu 20.04.1 server.

- **What** are you trying to achieve?  
Pull Network RADIUS failures into Grafana. These failures are monitored on a separate server running check\_mk.

- **How** are you trying to achieve it?  
Use the PNP plugin in Grafana to gain access to the check\_mk data.

- What happened?  
The check\_mk server has a check that keeps track of the RADIUS failures occurring over the last 5 minutes on the network. These failures are displayed in check\_mk as _integer_ values. What I’m seeing happening in Grafana is when the RADIUS failure changes from one integer value to the next, the corresponding value in Grafana is displayed as some intermediate decimal value that is between the previous value in check\_mk and the updated value in check\_mk. Eventually, once enough samples have come through, the correct value will be displayed in Grafana.

- What did you **expect** to happen?  
I expected the data in Grafana to mirror the data in check\_mk.

- Can you copy/paste the configuration(s) that you are having problems with?  
I don’t have a configuration to paste, but I have attached an image that illustrates my issue. When the number of RADIUS failures change from 12 to 10, there is some sort of weird ‘settling period’ where the data is in between 12 and 10. It’s almost like some sort of averaging operation is occurring behind the scenes that I don’t seem to have any control over. In an attempt to figure out what’s going on, I hard coded a 12 into the script that pushes data to check\_mk and after some time, I hard coded a 10 - so I know for a fact that there are two _and only two_ integer values being fed into Grafana. ![radius_failures3](https://us1.discourse-cdn.com/grafana/original/3X/5/8/58503f0a604b757cabb9c1615f3c06f90e4cc235.jpeg)  

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.  
No errors.

- Did you follow any online instructions? If so, what is the URL?  
Didn’t find anything related to this issue.

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [November 10, 2021, 6:53am UTC](https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913/2 "2021-11-10T06:53:37Z")

</div>

@cidr exactly what plugin are you using? This one?

> **[PNP](https://grafana.com/grafana/plugins/sni-pnp-datasource/)**
>
> pnp4nagios datasource

If so, that is a third-party community plugin. Here is the repo for that project and the code for the datasource logic:

> <https://github.com/sni/grafana-pnp-datasource/blob/master/src/datasource.js>

perhaps make an issue in that repo?

---

<div class="post-metadata">

**Author:** ![cidr](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cidr](https://community.grafana.com/u/cidr)\
**Post date:** [November 15, 2021, 1:36pm UTC](https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913/3 "2021-11-15T13:36:41Z")

</div>

@anon70503803

Thanks for your input, and yes, that is the plugin we’re currently using. Guess I will start looking through the code in the repo for clues and try to figure out what’s going on.

Thanks again

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [November 5, 2022, 3:58pm UTC](https://community.grafana.com/t/weird-averaging-operation-being-applied-to-data-when-incoming-queried-data-value-changes/55913/4 "2022-11-05T15:58:05Z")

</div>

Closed on November 5, 2022, 3:58pm UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
