nagiosplugin
nagiosplugin copied to clipboard
A Python class library which helps with writing Nagios (Icinga) compatible plugins.
If you access your results with by_state it creates and empty list entry for the accessed value. Example: I use `len(results.by_state[np.Critical]) > 0:` in `Summary.problem` to print Critical first followed...
The Performance class inherits from `namedtuple` and then implements additional methods. This seems like a prime candidate for a dataclass. Care should be taken that re-implementing this doesn't break the...
Linting complains about the signatures of several methods in this class (no-self-use), and the issue could be resolved by reimplementing them as `@staticmethod` methods, but that might be API-breaking if...
Linting complains about the `Context.performance()` signature, and the issue could be resolved by reimplementing this as a proper ABC, using the `@abstractmethod` decorator on the `performance` method.
Linting complains about the `Resource.probe()` signature, and the issue could be resolved by reimplementing this as a proper ABC, using the `@abstractmethod` decorator on the `probe` method.
**[Original report](https://bitbucket.org/flyingcircus/nagiosplugin/issue/1) by Christian Kauhaus (Bitbucket: [ckauhaus](https://bitbucket.org/ckauhaus), GitHub: [ckauhaus](https://github.com/ckauhaus)).** ---------------------------------------- * what CheckError is good for * unhandled exceptions * avoid second-order errors in Summary (e.g., by accessing non-existent results)
**[Original report](https://bitbucket.org/flyingcircus/nagiosplugin/issue/5) by Christian Kauhaus (Bitbucket: [ckauhaus](https://bitbucket.org/ckauhaus), GitHub: [ckauhaus](https://github.com/ckauhaus)).** ---------------------------------------- show how to: * provide custom fmt_metric * subclass Context and override describe() * subclass Summary
**[Original report](https://bitbucket.org/flyingcircus/nagiosplugin/issue/14) by jonathansd (Bitbucket: [jonathansd](https://bitbucket.org/jonathansd), GitHub: [jonathansd](https://github.com/jonathansd)).** ---------------------------------------- If you're installing a plugin that uses nagiosplugin. Since nagiosplugin is not in the standard library what are the installation procedures...
This should probably go alongside the LICENSE, CONTRIBUTORS, etc. once #20 is fixed.