Skip to content

Update additional info when reraising an alarm #32

Description

@hcs42

When raising an alarm twice, the additional info is not updated.

% There is not much space left on hda2
> ok = elarm:raise(partition_full, "/dev/hda2", [{level,90}])

% There is even less space left on hda2
> ok = elarm:raise(partition_full, "/dev/hda2", [{level,92}])

Afterwards, I would expect level to be 92, but it is 90:

> elarm:get_alarms().
{ok,[{alarm,partition_full,undefined,"/dev/hda2",
            {{2014,6,20},{9,53,59}},
            {1403,258039,196826},
            indeterminate,<<>>,<<>>,<<>>,
            [{level,90}],
            [],[],undefined,undefined,new,undefined}]}

I suggest changing elarm so that it will update the additional info with each raise.

The question arises whether we need to send notifications about the additional info being changed. In the longer term, probably yes, but I suggest not implementing that yet, because another missing Elarm feature is changing the severity of an existing alarm, and these may affect each other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions