1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef PERFDATAVALUE_H
4 #define PERFDATAVALUE_H
6 #include "base/i2-base.hpp"
7 #include "base/perfdatavalue-ti.hpp"
13 * A performance data value.
17 class PerfdataValue final : public ObjectImpl<PerfdataValue>
20 DECLARE_OBJECT(PerfdataValue);
22 PerfdataValue() = default;
24 PerfdataValue(const String& label, double value, bool counter = false, const String& unit = "",
25 const Value& warn = Empty, const Value& crit = Empty,
26 const Value& min = Empty, const Value& max = Empty);
28 static PerfdataValue::Ptr Parse(const String& perfdata);
29 String Format() const;
32 static Value ParseWarnCritMinMaxToken(const std::vector<String>& tokens,
33 std::vector<String>::size_type index, const String& description);
38 #endif /* PERFDATA_VALUE */