Git Product home page Git Product logo

elarm's People

Contributors

dszoboszlay avatar hcs42 avatar jonasrichard avatar lastres avatar luos avatar nygge avatar olikasg avatar surik avatar zsoltdudas-esl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elarm's Issues

Hex Package

Make sure the repo is rebar3-compatible and its deps are also hex.pm packages, then publish it on hex.pm.

How often should clear be called? In after

Is this the pattern to use? Always call clear if things went well regardless if there is a raise before?

try
    : code towards /dev/hda2
    ok = elarm:clear(partition_full, "/dev/hda2")
 catch
      ok = elarm:raise(partition_full, "/dev/hda2", [{level,90}])
 end

Update additional info when reraising an alarm

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.

Retrieving Alarm Log

Unable to get alarm log using elarm:read_log/1 with filter 'all'.

Can anyone help me with an example for retrieving Alarm Log ?

Use of Thresholds

How the threshold field in the alarm configuration is being used. Can you provide any one Use case ?

thanks in advance.

elarm functions could return whether the alarm already existed

We had an idea with Richard that elarm:raise and elarm:clear could return whether they raised/cleared an alarm or did nothing because the alarm was already existing/non-existing.

This way we could write code like this, which logs the problems only once:

case elarm:raise(...) of
    ok ->
        lager:error(...);
    existing ->
        ok
end.

@nygge, what do you think?

Receiving clear events while using filters

Unable to receive clear event while using filters {type, Type} or {src, Src}. Only receiving alarm raise info.
while using filters {type, Type} or {src, Src}, elarm is acknowledging raise info to the subscribed process. but it is not acknowledging for clear info to subscribed process.
when i use filter as "all", both raise and clear acknowledgement is given by elarm.

I have attached source code below.
subscribed_process.txt
monitor_process.txt

Can anyone suggest me how to receive both alarm and clear events by using filter "type" or "src"?

Remove dependency on gproc

Why does this application need gproc? Why not let users choose how they want to register stuff? Couldn't a simple local name be given to the elarm_summary_sup process?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.