MCPcopy Create free account
hub / github.com/Icinga/icinga2 / ParseWarnCritMinMaxToken

Method ParseWarnCritMinMaxToken

lib/base/perfdatavalue.cpp:398–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398Value PerfdataValue::ParseWarnCritMinMaxToken(const std::vector<String>& tokens, std::vector<String>::size_type index, const String& description)
399{
400 if (tokens.size() > index && tokens[index] != "U" && tokens[index] != "" && tokens[index].FindFirstNotOf("+-0123456789.eE") == String::NPos)
401 return Convert::ToDouble(tokens[index]);
402 else {
403 if (tokens.size() > index && tokens[index] != "")
404 Log(LogDebug, "PerfdataValue")
405 << "Ignoring unsupported perfdata " << description << " range, value: '" << tokens[index] << "'.";
406 return Empty;
407 }
408}

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
FindFirstNotOfMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected