influxdata / influxdata/influxdb
influxDB OSS 2.0.9 notificationRules limit and limitEvery not working
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
configure a notificationRule with limit and limitEvery via API:
"limit": 1,
"limitEvery": 900,
e.g.
```
{
"notificationRules": [
{
"id": "************",
"name": "TEST",
"endpointID": "************",
"orgID": "************",
"ownerID": "************",
"every": "15s",
"offset": "0s",
"runbookLink": "",
"statusRules": [
{
"currentLevel": "CRIT",
"previousLevel": null
}
],
"limit": 1,
"limitEvery": 900,
"createdAt": "2021-10-13T10:23:15.306718302Z",
"updatedAt": "2021-10-13T21:09:28.918892859Z",
"type": "http",
"labels": [],
"links": {
"self": "/api/v2/notificationRules/***********",
"labels": "/api/v2/notificationRules/***********/labels",
"members": "/api/v2/notificationRules/***********/members",
"owners": "/api/v2/notificationRules/***********/owners",
"query": "/api/v2/notificationRules/***********/query"
},
"status": "active",
"latestCompleted": "2021-10-13T21:09:45Z",
"latestScheduled": "2021-10-13T21:09:45Z",
"lastRunStatus": "success"
}
],
"links": {
"self": "/api/v2/notificationRules?descending=false&limit=20&offset=0"
}
}
```
__Expected behavior:__
I expect to receive maximum 1 notification every 900s
__Actual behavior:__
I receive a notification every 15s (according to the every and offset fields)
"every": "15s",
"offset": "0s",
__Environment info:__
influxDB 2.0.9 OSS official docker container
Contributor guide
Research direction
Start with the notification-rules API path and trace how the limit and limitEvery fields are handled when rules run. Reproduce the configuration against the stated InfluxDB 2.0.9 Docker environment, then verify that no more than one notification is sent during each 900-second interval.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100