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

Update simplemon widget counts to only show unhandled problems (!ack && !downtime) #17

Closed
odrino14 opened this issue May 24, 2017 · 8 comments · Fixed by #24
Closed

Comments

@odrino14
Copy link

Die Ack-Probleme von Host und Services werden als Critical noch mitgezählt

@mcktr
Copy link

mcktr commented May 30, 2017

Hi,

i've just committed a change, i hope it will fix the wrong calculation. In my vagrant box it worked, please be so kind and test it before i will send a PR :)

To test just change the file jobs/icinga2.rb with the same file from the referenced commit.

--

Hi,

ich habe gerade eine Änderung committed, ich hoffe dass die die falsche Berechnung fixt. In meiner Testumgebung hat das ganze funktioniert, bitte sei so nett und teste es bevor ich einen PR sende :)

Um das zu testen tausche die Datei jobs/icinga2.rb mit der gleichen Datei aus dem referenzierten Commit aus.

@odrino14
Copy link
Author

Hi,
cool, ich hatte auf sowas gedachte danke dafür ich kann leider erst am Freitag testen aber ich glaube sowas würde funktionieren

@dnsmichi
Copy link
Collaborator

I was thinking about a generic "handled problems" count, since you cannot determine a host/service which is in downtime or acknowledged by these numbers. A similar thing is done already for the problems list, and could be used to just count all problems which are unhandled.

@dnsmichi dnsmichi changed the title falsche Zählweise von Critical Update simplemon widget counts to only show unhandled problems (!ack && !downtime) May 31, 2017
@mcktr
Copy link

mcktr commented May 31, 2017

I've added a new method to lib/icinga2.rb to count handled problems. The method countHandledProblems count a Problem as handled if its acknowledged or in a downtime. To get rid off negative numbers (e.g. host in downtime but in ok state) it considers only states that are not ok.

The service calculation is a bit tricky. There must be a distinction between services in warning state and services in critical state. Now a acknowledged warning state of a service will add -1 on the service critical widget. I don't know how to handle this reliable.

@odrino14
Copy link
Author

odrino14 commented Jun 2, 2017

hi @mcktr i got a same by acknowledged warning state

mcktr added a commit to mcktr/dashing-icinga2 that referenced this issue Jun 3, 2017
@mcktr
Copy link

mcktr commented Jun 3, 2017

Hi,

with my new commit it should only show unhandled problems. The calculation considers now the state (e.g. a acknowledged service in warning state will not count +1).

Please test it. :)

@odrino14
Copy link
Author

hi @mcktr,
I tried it and it is working great thanks or your hlep

@mcktr
Copy link

mcktr commented Jun 12, 2017

Hi @odrino14,
glad to hear that. Thanks for testing :)

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