Uninett / zino

Zino 2.0 - Network state monitor for research networks
Apache License 2.0
3 stars 5 forks source link

Fix log message on initial Juniper alarm #258

Closed johannaengland closed 3 months ago

johannaengland commented 3 months ago

Closes #213.

We got the log message "yellow alarms went from None to 1", because on the first Juniper alarm we create an event, which does not have an alarm count yet.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.99%. Comparing base (b1ffc1c) to head (b02b21f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #258 +/- ## ========================================== - Coverage 98.99% 98.99% -0.00% ========================================== Files 50 50 Lines 6740 6739 -1 ========================================== - Hits 6672 6671 -1 Misses 68 68 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hmpf commented 3 months ago

Fun bug!

johannaengland commented 3 months ago

Question: what happens if we go from N to 0 alarms?

* Is there another message?

Yes, a log is added to the event that says exactly that.

* Is the event closed?

No, as in Zino1, events are never closed automatically, that has to happen manually.

hmpf commented 3 months ago
* Is the event closed?

No, as in Zino1, events are never closed automatically, that has to happen manually.

So if it goes back from 0 to N the event is reused?

Now it makes me wonder how clients show this. 0 is a good thing and should be shown different from bigger than 0. I guess we can test when we have a way to fake an event =)

johannaengland commented 3 months ago

So if it goes back from 0 to N the event is reused?

Yes, but only if the event has not been closed by then.

Now it makes me wonder how clients show this. 0 is a good thing and should be shown different from bigger than 0. I guess we can test when we have a way to fake an event =)

I would assume that clients show it just like any other event. But feel free to post that as an issue in Howitz