rajnandan1 / kener

Kener is a Modern Self hosted Status Page, batteries included
https://kener.ing/
MIT License
2.5k stars 104 forks source link

Show daily status bar as Red only if it passes a threshold #54

Closed rayjanoka closed 6 months ago

rayjanoka commented 9 months ago

Is your feature request related to a problem? Please describe.

Some of the services that I am monitoring are not the most reliable so sometimes I get 1 or 2 random missed pings per day and then I get a red bar for that whole day and it looks bad. I would like to set a threshold of down minutes per day before I get a red bar.

Describe the solution you'd like

I would like a threshold setting where I can set it to only show the day as DOWN (red) if it was down for more than N minutes. Most likely having this setting per monitor would be best, although I'm fine using it globally across all monitors.

Describe alternatives you've considered

None

Additional context

I did something like this in ninety.js and it seems to work.

from

    if (dayData.DOWN > 0) {
        cssClass = StatusObj.DOWN;
        message = getDayMessage("Down", dayData.DOWN);
    }

to

    if (dayData.DOWN > 3) { // modification to suppress a few misses
        cssClass = StatusObj.DOWN;
        message = getDayMessage("Down", dayData.DOWN);
    }

The simple way I implement it here may be problematic as a real outage will have to pass this threshold before it will be displayed on the page, not sure if there is a way around that at least for an outage declared through a GitHub issue (I have not tested this).

rajnandan1 commented 6 months ago
Screenshot 2024-04-30 at 11 17 17 AM