| 2050 | } |
| 2051 | |
| 2052 | void ExternalCommandProcessor::ChangeMaxSvcCheckAttempts(double, const std::vector<String>& arguments) |
| 2053 | { |
| 2054 | Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]); |
| 2055 | |
| 2056 | if (!service) |
| 2057 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot change max check attempts for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'")); |
| 2058 | |
| 2059 | int attempts = Convert::ToLong(arguments[2]); |
| 2060 | |
| 2061 | Log(LogNotice, "ExternalCommandProcessor") |
| 2062 | << "Changing max check attempts for service '" << arguments[1] << "' to '" << arguments[2] << "'"; |
| 2063 | |
| 2064 | service->ModifyAttribute("max_check_attempts", attempts); |
| 2065 | } |
| 2066 | |
| 2067 | void ExternalCommandProcessor::ChangeHostCheckTimeperiod(double, const std::vector<String>& arguments) |
| 2068 | { |
nothing calls this directly
no test coverage detected