# How to compute a rate while rejecting jumps

**URL:** <https://community.netdata.cloud/t/how-to-compute-a-rate-while-rejecting-jumps/4893>\
**Category:** Help\
**Tags:** linux, platform\
**Created:** [November 17, 2023, 3:49pm UTC](https://community.netdata.cloud/t/how-to-compute-a-rate-while-rejecting-jumps/4893 "2023-11-17T15:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnavila](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jnavila](https://community.netdata.cloud/u/jnavila)\
**Post date:** [November 17, 2023, 3:49pm UTC](https://community.netdata.cloud/t/how-to-compute-a-rate-while-rejecting-jumps/4893/1 "2023-11-17T15:49:17Z")

</div>

## Problem/Question

I would like to monitor and raise an alert when the filling rate of a disk/partition is above the limit

I have modified the default rule for disk fill rate this way:

```auto
template: disk_fill_rate_alarm
      on: disk.space
      os: linux freebsd
   hosts: *
families: /var
  lookup: min -10m at -60m unaligned of avail
    calc: ($this - $avail) / (($now - $after) / 3600)
   every: 1m
   units: GB/hour
    warn: $this > (($status >= $WARNING) ? (40e-3): (50e-3))
    info: average rate the disk fills up (positive) for the last hour

```

The problem is that whenever the disk has filled a bit and an administrator removes some log files, the alarm does not work because the comparison is performed with the status one hour ago.

What I would like is a way to recompute the rate by summing the differences of avail between consecutive values, rejecting big negative jumps and summing them back.

## Relevant docs you followed/actions you took to solve the issue

The grouping methods described in [Database queries/lookup | Learn Netdata](https://learn.netdata.cloud/docs/rest-api/queries) does not allow the specific processing I’m looking for. It seems there’s no way to design a custom grouping method.

## Environment/Browser/Agent’s version etc

netdata\_1.33.1 on ubuntu

## What I expected to happen

An integrated grouping method “rate” with optional rejection parameters. Or a way to design a custom grouping.
