Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve alert with mininimal interval/duration and retention configuration keys #2558

Closed
ajgringo619 opened this issue Sep 25, 2023 · 5 comments

Comments

@ajgringo619
Copy link

I would like to see glances to have the ability to remove warning/critical issue messages that are no longer relevant, either by time-out or by only displaying a set amount of messages. As you can see from the posted screenshot, my screen gets filled up pretty fast when there's a lot of stuff going on:

glances-warnings

Now, since these messages can still be relevant, I'm not suggesting automatically removing them; just give use the option to limit their number to something a little more reasonable.

@nicolargo
Copy link
Owner

Hi @ajgringo619

in the develop branch, i just added a feature to be able to tweek the alert plugin from the Glances configuration file:

[alert]
disable=True
# Maximum number of alerts to display (default is 10)
; max_events=10

This is just a first step.

I also want to open the discussion regarding another enhancement by making the minimum time between two alerts configurable ?

For example:

First alert starts at 01:00:00 with a duration of 1 minutes.
Second alert starts at 01:01:30 with a duration of 2 minutes.
Third alert starts at 01:04:00 with a duration of 30 seconds.

Actualy Glances will display 3 alerts.

If we set the min_delay_between_events to 60 seconds, the future Glances version will display only one alerts.

What do you think @ajgringo619 ?

@ajgringo619
Copy link
Author

This looks great. As an additional setting, allow each type of alert to be configurable separately, so that a user can decide how long to show a critical alert over a warning.

@nicolargo
Copy link
Owner

@ajgringo619 something like that:

[alert]
disable=True
# Maximum number of alerts to display (default is 10 events)
; max_events=10
# Minimal delay between events (default is 60 seconds)
# If delay between 2 events is lower than the value, then the events are merged
; min_delay_between_events=60
# Alert retention (by default, no retention)
# Define the time (in seconds) events are stored and displayed
;warning_retention=1000
;critical_retention=3600

@ajgringo619
Copy link
Author

This looks great - thank you!

@nicolargo nicolargo changed the title Configure display of warnings/critical issues Improve events alert with mininimal interval and minimal duration configuration keys Mar 16, 2024
@nicolargo nicolargo changed the title Improve events alert with mininimal interval and minimal duration configuration keys Improve alert with mininimal interval/duration and retention configuration keys Mar 16, 2024
@nicolargo
Copy link
Owner

Done in the develop branch for the duration and interval configuration key.

Configuration file example:

[alert]
disable=False
# Maximum number of events to display (default is 10 events)
max_events=10
# Minimum duration for an event to be taken into account (default is 6 seconds)
min_duration=6
# Minimum time between two events of the same type (default is 6 seconds)
# This is used to avoid too many alerts for the same event
# Events will be merged
min_interval=6

TODO: add retention for warning and critical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants