naparuba/shinken — pull request #1342 by dgilm (2014-10-15 15:26:43+00:00)
Title: Fixed service totals and host totals

Hi!

The algorithm to get the % of OK services and OK hosts is wrong. There is a problem rounding the result. You will always lose precision with an amount of services greater than 100.

Here's an example:

```
>>> all_services = 9000
>>> problem_services = 20
>>> 100-problem_services*100/all_services
100
>>> # WTF! I have critical services and my status is still 100% OK? Mmmmm
...
>>> int(100-problem_services*100/float(all_services))
99
```

This avoid confusions at the currently dashboard (and maybe in other parts of shinken)