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

Method ChangeRetryHostCheckInterval

lib/icinga/externalcommandprocessor.cpp:1884–1897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1882}
1883
1884void ExternalCommandProcessor::ChangeRetryHostCheckInterval(double, const std::vector<String>& arguments)
1885{
1886 Host::Ptr host = Host::GetByName(arguments[0]);
1887
1888 if (!host)
1889 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update retry interval for non-existent host '" + arguments[0] + "'"));
1890
1891 Log(LogNotice, "ExternalCommandProcessor")
1892 << "Updating retry interval for host '" << arguments[0] << "'";
1893
1894 double interval = Convert::ToDouble(arguments[1]);
1895
1896 host->ModifyAttribute("retry_interval", interval * 60);
1897}
1898
1899void ExternalCommandProcessor::EnableHostEventHandler(double, const std::vector<String>& arguments)
1900{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected