# Influx 2.7 Checks fail

**URL:** <https://community.influxdata.com/t/influx-2-7-checks-fail/29983>\
**Category:** Checks & Notifications\
**Tags:** checks\
**Created:** [May 18, 2023, 2:04am UTC](https://community.influxdata.com/t/influx-2-7-checks-fail/29983 "2023-05-18T02:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![54hahaer](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/54hahaer/32/13476_2.png) [@54hahaer](https://community.influxdata.com/u/54hahaer)\
**Post date:** [May 18, 2023, 2:04am UTC](https://community.influxdata.com/t/influx-2-7-checks-fail/29983/1 "2023-05-18T02:04:00Z")

</div>

I have telegraf ping input and send the result to influx2.7. I am trying to setup the alert meanwhile to send it to pagerduty to trigger the phone call.  
I see the procedure is to create the check, setup the threshold, select the notification endpoints and rules.  
Everything is done so far. But it’s not working as expected. The check failed, there is no status or notification created inside \_montioring bucket. Based on the log from the \_task, it shows ` unsupported input type for mean aggregate: string`  
I believe when the ping result is written to the bucket. I tried a few based on the readings, to have offset to avoid the read/write conflict, it doesn’t really help.  
I also tried to convert the string to float but the same result.

The following is what i have, can you help me out?

import “influxdata/influxdb/monitor”  
import “influxdata/influxdb/v1”

data =  
from(bucket: “telegraf”)  
|\> range(start: -1m)  
|\> filter(fn: (r) =\> r[“url”] == “10.25.74.168”)  
|\> filter(fn: (r) =\> r[“\_field”] == “percent\_packet\_loss”)  
|\> map(fn: (r) =\> ({r with “\_value”: float(v: r[“\_value”])}))  
|\> aggregateWindow(every: 1m, fn: mean, createEmpty: false)

option task = {name: “Packet Loss”, every: 1m, offset: 15s}

check = {\_check\_id: “0b371ffd76a1f000”, \_check\_name: “Packet Loss”, \_type: “threshold”, tags: {}}  
crit = (r) =\> r[“percent\_packet\_loss”] \> 20.0  
messageFn = (r) =\> “Check: ${r.\_check\_name} is: ${r.\_level}”

data |\> v1"fieldsAsCols" |\> monitor[“check”](data: check, messageFn: messageFn, crit: crit)

---

<div class="post-metadata">

**Author:** ![54hahaer](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/54hahaer/32/13476_2.png) [@54hahaer](https://community.influxdata.com/u/54hahaer)\
**Post date:** [May 20, 2023, 1:42am UTC](https://community.influxdata.com/t/influx-2-7-checks-fail/29983/2 "2023-05-20T01:42:56Z")

</div>

I managed to find the log by select the last instead of mean. It shows the user doesn’t have rights to write the data to \_monitoring. Checked with our DBA team and they are able to create the checks without any issues. Clearly it’s permission issues, but they are not sure which one specifically, thus grant us admin access.
