Skip to content

Improvement on administrator alerts #6613

Description

@nvazquez
ISSUE TYPE
  • Improvement Request
COMPONENT NAME
Alerts
CLOUDSTACK VERSION
4.16.1 and onwards
CONFIGURATION

Use the default values for the configurations:

  • capacity.check.period : 300000
  • alert.purge.delay : 0
  • alert.purge.interval : 86400
  • Define notification thresholds for cluster capacity: (for example cluster.storage.capacity.notificationthreshold : 0.75 )
OS / ENVIRONMENT

N/A

SUMMARY

The first time a cluster threshold is exceeded CloudStack notifies the administrator by sending an email and creates a record on the alert table. If the alert.purge.delay value is set to 0 (default value) then this record is never deleted, so the next time the threshold is exceeded the administrator does not get notified. CloudStack queries the database and searches for records on the alert table for the same alert type and cluster, and in case it finds an existing records it does not send the notification email.

Example:

DB:

mysql> select * from alert where type = 3 and cluster_id = 1 and archived = false;
+-------+--------------------------------------+------+------------+--------+----------------+------------------------------------------------------------------------------------------------------------------+------------+---------------------+---------------------+----------+----------+-------------------------+---------------------------------------------------------------------------------------+
| id    | uuid                                 | type | cluster_id | pod_id | data_center_id | subject                                                                                                          | sent_count | created             | last_sent           | resolved | archived | name                    | content                                                                               |
+-------+--------------------------------------+------+------------+--------+----------------+------------------------------------------------------------------------------------------------------------------+------------+---------------------+---------------------+----------+----------+-------------------------+---------------------------------------------------------------------------------------+
| 28623 | 885be044-4507-4a18-b71a-44af87ada1cf |    3 |          1 |      1 |              1 | System Alert: Remaining unallocated Storage is low in cluster BNZ-CL-001 pod BNZ-POD-01 of availability zone BNZ |          1 | 2021-09-05 02:41:48 | 2021-09-05 02:41:48 | NULL     |        0 | ALERT.STORAGE.ALLOCATED | Unallocated storage space is low, total: 20971496 MB, allocated: 16332262 MB (77.88%) |
+-------+--------------------------------------+------+------------+--------+----------------+------------------------------------------------------------------------------------------------------------------+------------+---------------------+---------------------+----------+----------+-------------------------+---------------------------------------------------------------------------------------+
1 row in set (1.26 sec)

Logs:

2022-08-03 00:01:53,297 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-166624fc) (logid:8e4ca7a5) System Alert: Remaining unallocated Storage is low in cluster BNZ-CL-001 pod BNZ-POD-01 of availability zone BNZ
2022-08-03 00:01:53,298 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-166624fc) (logid:8e4ca7a5) Unallocated storage space is low, total: 62914488 MB, allocated: 50750692 MB (80.67%)
2022-08-03 00:01:53,298 WARN  [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-166624fc) (logid:8e4ca7a5) alertType=[3] dataCenterId=[1] podId=[1] clusterId=[1] message=[System Alert: Remaining unallocated Storage is low in cluster BNZ-CL-001 pod BNZ-POD-01 of availability zone BNZ].

2022-08-03 00:01:54,255 DEBUG [c.c.a.AlertManagerImpl] (CapacityChecker:ctx-166624fc) (logid:8e4ca7a5) Have already sent: 1 emails for alert type '3' -- skipping send email

Activity

  1. moved this to 🏗 Assigned in ACS Backlogon Aug 9, 2022
  2. moved this from 🏗 Assigned to Backlog in ACS Backlogon Aug 9, 2022
  3. gitsan13 commented on Sep 7, 2022

    @gitsan13

    I would like to add this enhancement feature to this project. Kindly guide me through the process as I am a fresher in this field.

  4. DaanHoogland commented on Sep 26, 2022

    @DaanHoogland
    Contributor

    @gitsan13 have you looked at the hackerbook? (https://github.com/shapeblue/hackerbook) When you feel comfortable just submit a PR and we'll go from there.

  5. added this to the 4.19.0.0 milestone on Jun 23, 2023
  6. modified the milestones: 4.19.0.0, 4.20.0.0 on Dec 14, 2023
  7. 4 remaining items

  8. added this to the unplanned milestone on Sep 10, 2024
  9. added a commit that references this issue on Jul 29, 2025
    3ae4bcf
  10. shwstppr commented on Jul 30, 2025

    @shwstppr
    Contributor

    @nvazquez I've created #11325 to address this behaviour and allow operators to customize which alerts they want published every time

  11. added a commit that references this issue on Jan 30, 2026
    bb8e7d3
  12. modified the milestones: unplanned, 4.23.0 on Jan 30, 2026
  13. added a commit that references this issue on Feb 6, 2026
    ef6d62d
  14. added a commit that references this issue on Mar 3, 2026
    aa36063
  15. added a commit that references this issue on Mar 25, 2026
    b20af6a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions