InfluxDB-获取多个标签的最后值的平均值作为单个值?

时间:2020-08-04 22:27:59

标签: influxdb

我有一个脚本记录服务器上每个内核的CPU温度。这些条目存储在InfluxDB中,其中CPU ID作为标签,温度作为字段。

我希望能够获得所有内核的最新温度读数的简单平均值。

我尝试过:

while IFS= read -r line; do
   if [ -n "${lastline}" ]; then
      echo "Processing lines starting with ${lastline:0:2} and ${line:0:2}"
   fi
   lastline="${line}"
done <<< "${yourvar}"
  

但这不起作用(list = [firstScore, secondScore, thirdScore] with open('test.csv', 'rt') as f: reader = csv.reader(f, delimiter=',') # skip the header of your csv next(reader) for row in reader: if((list[0] == int(row[1])) and (list[1] == int(row[2])) and (list[2] == int(row[3]))): # print name (present in first column -> index 0 of the row) print(row[0]) break else: print("No match found..") )。

这可能吗?

0 个答案:

没有答案