/** * Returns true if the specified interface is included by at least one * package which has the specified service and that service is enabled (set * to "on"). * * @param iface * {@link OnmsIpInterface} to lookup * @param svcName * The service name to lookup * @return true if Collectd config contains a package which includes the * specified interface and has the specified service enabled. */ public boolean isServiceCollectionEnabled(final OnmsIpInterface iface, final String svcName) { for (Package wpkg : m_collectdConfig.getPackages()) { // Does the package include the interface? if (interfaceInPackage(iface, wpkg)) { // Yes, now see if package includes // the service and service is enabled // if (wpkg.serviceInPackageAndEnabled(svcName)) { // Thats all we need to know... return true; } } } return false; }
if (wpkg.serviceInPackageAndEnabled(svcName)) {
if (!wpkg.serviceInPackageAndEnabled(svcName)) { LOG.debug("getSpecificationsForInterface: address/service: {}/{} not scheduled, service is not enabled or does not exist in package: {}", iface, svcName, wpkg.getName()); continue;