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

Method ChangeRetrySvcCheckInterval

lib/icinga/externalcommandprocessor.cpp:1869–1882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1867}
1868
1869void ExternalCommandProcessor::ChangeRetrySvcCheckInterval(double, const std::vector<String>& arguments)
1870{
1871 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1872
1873 if (!service)
1874 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update retry interval for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1875
1876 double interval = Convert::ToDouble(arguments[2]);
1877
1878 Log(LogNotice, "ExternalCommandProcessor")
1879 << "Updating retry interval for service '" << arguments[1] << "'";
1880
1881 service->ModifyAttribute("retry_interval", interval * 60);
1882}
1883
1884void ExternalCommandProcessor::ChangeRetryHostCheckInterval(double, const std::vector<String>& arguments)
1885{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected