Disable the metric in options
This commit is contained in:
Родитель
927c201a7f
Коммит
4d9e9f8a52
|
@ -21,6 +21,12 @@ Monitor::Monitor(const std::string& nodeName, const std::string& netName, int in
|
|||
: name(nodeName), networkName(netName), lock(PTHREAD_RWLOCK_INITIALIZER), intervalSeconds(interval),
|
||||
isCollected(false)
|
||||
{
|
||||
if (NodeManagerConfig::GetMetricDisabled())
|
||||
{
|
||||
Logger::LogDebug("MetricDisabled = true, skip initializing the monitor.");
|
||||
return;
|
||||
}
|
||||
|
||||
std::get<0>(this->metricData[1]) = 1;
|
||||
std::get<0>(this->metricData[3]) = 0;
|
||||
std::get<0>(this->metricData[12]) = 1;
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace hpc
|
|||
AddConfigurationItem(std::string, HeartbeatUri);
|
||||
AddConfigurationItem(std::string, TaskCompletionUri);
|
||||
AddConfigurationItem(std::string, HostsFileUri);
|
||||
AddConfigurationItem(bool, MetricDisabled);
|
||||
|
||||
static std::string ResolveRegisterUri(pplx::cancellation_token token)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче