NicolasLM / sauna

Lightweight daemon that runs and reports health checks
https://sauna.readthedocs.io
BSD 2-Clause "Simplified" License
18 stars 10 forks source link

fix(base.py): cast into a float more than an int percentage #73

Closed FlorentinDUBOIS closed 6 years ago

FlorentinDUBOIS commented 6 years ago

Hello!

I submit this pull request in order to support natively numerical number percentage in the configuration.

There is an example below:

---
...
plugins:
  - type: memory
    checks:
      - type: used_percent
        name: memory_used_percent
        warn: 89.1%
        crit: 90.9%
      - type: swap_used_percent
        name: memory_swap_used_percent
        warn: 5%
        crit: 50%
NicolasLM commented 6 years ago

Hey @FlorentinDUBOIS, thanks for the PR.

Cheers to my OVH friends ;)