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

Method ChangeNormalSvcCheckInterval

lib/icinga/externalcommandprocessor.cpp:1839–1852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1837}
1838
1839void ExternalCommandProcessor::ChangeNormalSvcCheckInterval(double, const std::vector<String>& arguments)
1840{
1841 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1842
1843 if (!service)
1844 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update check interval for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1845
1846 double interval = Convert::ToDouble(arguments[2]);
1847
1848 Log(LogNotice, "ExternalCommandProcessor")
1849 << "Updating check interval for service '" << arguments[1] << "'";
1850
1851 service->ModifyAttribute("check_interval", interval * 60);
1852}
1853
1854void ExternalCommandProcessor::ChangeNormalHostCheckInterval(double, const std::vector<String>& arguments)
1855{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected