1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
12 BunitB = 0, BunitkB = 1, BunitMB = 2, BunitGB = 3, BunitTB = 4
17 TunitMS, TunitS, TunitM, TunitH
22 OK = 0, WARNING = 1, CRITICAL = 2
28 // doubles are always enough for ANY 64 bit value
31 // true means everything BELOW upper/outside [lower-upper] is fine
38 threshold(const double v, const double c, bool l = true, bool p = false);
40 threshold(const std::wstring&);
42 // returns true if the threshold is broken
43 bool rend(const double val, const double max = 100.0);
45 // returns a printable string of the threshold
46 std::wstring pString(const double max = 100.0);
48 threshold toSeconds(const Tunit& fromUnit);
51 std::wstring removeZero(double);
52 std::vector<std::wstring> splitMultiOptions(const std::wstring&);
54 Bunit parseBUnit(const std::wstring&);
55 std::wstring BunitStr(const Bunit&);
56 Tunit parseTUnit(const std::wstring&);
57 std::wstring TunitStr(const Tunit&);
59 void printErrorInfo(unsigned long err = 0);
60 std::wstring formatErrorInfo(unsigned long err);
62 std::wstring stateToString(const state&);
64 #endif /* THRESHOLDS_H */