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

Method ChangeNormalHostCheckInterval

lib/icinga/externalcommandprocessor.cpp:1854–1867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1852}
1853
1854void ExternalCommandProcessor::ChangeNormalHostCheckInterval(double, const std::vector<String>& arguments)
1855{
1856 Host::Ptr host = Host::GetByName(arguments[0]);
1857
1858 if (!host)
1859 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update check interval for non-existent host '" + arguments[0] + "'"));
1860
1861 Log(LogNotice, "ExternalCommandProcessor")
1862 << "Updating check interval for host '" << arguments[0] << "'";
1863
1864 double interval = Convert::ToDouble(arguments[1]);
1865
1866 host->ModifyAttribute("check_interval", interval * 60);
1867}
1868
1869void ExternalCommandProcessor::ChangeRetrySvcCheckInterval(double, const std::vector<String>& arguments)
1870{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected