| 2035 | } |
| 2036 | |
| 2037 | void ExternalCommandProcessor::ChangeMaxHostCheckAttempts(double, const std::vector<String>& arguments) |
| 2038 | { |
| 2039 | Host::Ptr host = Host::GetByName(arguments[0]); |
| 2040 | |
| 2041 | if (!host) |
| 2042 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot change max check attempts for non-existent host '" + arguments[0] + "'")); |
| 2043 | |
| 2044 | int attempts = Convert::ToLong(arguments[1]); |
| 2045 | |
| 2046 | Log(LogNotice, "ExternalCommandProcessor") |
| 2047 | << "Changing max check attempts for host '" << arguments[0] << "' to '" << arguments[1] << "'"; |
| 2048 | |
| 2049 | host->ModifyAttribute("max_check_attempts", attempts); |
| 2050 | } |
| 2051 | |
| 2052 | void ExternalCommandProcessor::ChangeMaxSvcCheckAttempts(double, const std::vector<String>& arguments) |
| 2053 | { |
nothing calls this directly
no test coverage detected