Implement the parse_performance_data function

fixes #8693
This commit is contained in:
Gunnar Beutner 2015-03-11 16:29:20 +01:00
parent 1756859125
commit 2826ef7647
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ log(value) | Writes a message to the log. Non-string values
log(severity, facility, value) | Writes a message to the log. `severity` can be one of `LogDebug`, `LogNotice`, `LogInformation`, `LogWarning`, and `LogCritical`. Non-string values are converted to a JSON string.
typeof(value) | Returns the type object for a value.
get_time() | Returns the current UNIX timestamp.
parse_performance_data(pd) | Parses a performance data string and returns an array describing the values.
exit(integer) | Terminates the application.
## <a id="object-accessor-functions"></a> Object Accessor Functions

View File

@ -21,6 +21,7 @@
#include "base/convert.hpp"
#include "base/exception.hpp"
#include "base/logger.hpp"
#include "base/function.hpp"
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
@ -28,6 +29,7 @@
using namespace icinga;
REGISTER_TYPE(PerfdataValue);
REGISTER_SCRIPTFUNCTION(parse_performance_data, PerfdataValue::Parse);
PerfdataValue::PerfdataValue(void)
{ }