public void stopLogFileEventPollers() { boolean sigarAvailable = this.resourceContext.getSystemInformation().isNative(); if (!sigarAvailable) { return; } for (Iterator<PropertyMap> iterator = this.startedEventSources.iterator(); iterator.hasNext(); ) { PropertyMap logEventSource = iterator.next(); EventContext eventContext = this.resourceContext.getEventContext(); String logFilePath = logEventSource.getSimpleValue(LogEventSourcePropertyNames.LOG_FILE_PATH, null); eventContext.unregisterEventPoller(LOG_ENTRY_EVENT_TYPE, logFilePath); iterator.remove(); } }
boolean sigarAvailable = this.resourceContext.getSystemInformation().isNative(); if (!sigarAvailable && !enabledEventSources.isEmpty()) { boolean nativeSystemInfoDisabled = SystemInfoFactory.isNativeSystemInfoDisabled();
JvmResourceKey.Type oldKeyType = oldKey.getType(); if (oldKeyType == JvmResourceKey.Type.Legacy || oldKeyType == JvmResourceKey.Type.JmxRemotingPort) { if (!inventoriedResource.getSystemInformation().isNative()) { log.warn("Cannot attempt to upgrade Resource key [" + inventoriedResource.getResourceKey() + "] of JVM Resource, because this Agent is not running with native system info support (i.e. SIGAR).");