/** * <p>PassiveServiceMonitor class.</p> * * @author <a href="mailto:david@opennms.org">David Hustace</a> * @version $Id: $ */ // this retrieves data from the deamon so it is not Distributable @Distributable(DistributionContext.DAEMON) public class PassiveServiceMonitor extends AbstractServiceMonitor { @Override public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { return PassiveStatusKeeper.getInstance().getStatus(svc.getNodeLabel(), svc.getIpAddr(), svc.getSvcName()); } @Override public String getEffectiveLocation(String location) { // Always run the PSK in the same JVM return MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID; } }
private List<DistributionContext> getSupportedDistributionContexts(final Class<? extends ServiceMonitor> mc) { final Distributable distributable = mc.getAnnotation(Distributable.class); final List<DistributionContext> declaredContexts = distributable == null ? Collections.singletonList(DistributionContext.DAEMON) : Arrays.asList(distributable.value()); return declaredContexts; }
/** * <p>LoopMonitor class.</p> * * @author david * @version $Id: $ */ @Distributable public class LoopMonitor extends AbstractServiceMonitor { @Override public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) { final LoopPlugin lp = new LoopPlugin(); boolean isAvailable = lp.isProtocolSupported(svc.getAddress(), parameters); int status = (isAvailable ? PollStatus.SERVICE_AVAILABLE : PollStatus.SERVICE_UNAVAILABLE); final StringBuilder sb = new StringBuilder(); sb.append("LoopMonitor configured with is-supported = "); sb.append(ParameterMap.getKeyedString(parameters, "is-supported", "false")); sb.append(" for ip-match: "); sb.append(ParameterMap.getKeyedString(parameters, "ip-match", "*.*.*.*")); return PollStatus.get(status, sb.toString()); } }
/** * This class is designed to be used by the service poller framework to test the * availability of the LDAPS service on remote interfaces. The class implements * the ServiceMonitor interface that allows it to be used along with other * plug-ins by the service poller framework. * * @author <a href="mailto:david@opennms.org">David Hustace </a> * @author <A HREF="mailto:tarus@opennms.org">Tarus Balog </A> * @author <A HREF="mailto:jason@opennms.org">Jason </A> */ @Distributable final public class LdapsMonitor extends LdapMonitor { @Override protected int determinePort(Map<String, Object> parameters) { return ParameterMap.getKeyedInteger(parameters, "port", LDAPConnection.DEFAULT_SSL_PORT); } @Override protected SocketWrapper getSocketWrapper() { return new SslSocketWrapper(); } }
/** * This class is designed to be used by the service poller framework to test the * availability of the IMAPS service on remote interfaces. The class implements * the ServiceMonitor interface that allows it to be used along with other * plug-ins by the service poller framework. * */ @Distributable final public class ImapsMonitor extends ImapMonitor { /** * Default IMAPS ports. */ private static final int DEFAULT_IMAPS_PORT = 993; @Override protected int determinePort(Map<String, Object> parameters) { return ParameterMap.getKeyedInteger(parameters, "port", DEFAULT_IMAPS_PORT); } /** {@inheritDoc} */ @Override protected SocketWrapper getSocketWrapper() { return new SslSocketWrapper(); } }
@Distributable public class HttpsMonitor extends HttpMonitor {
@Distributable(DistributionContext.DAEMON) public class MinionHeartbeatMonitor extends AbstractServiceMonitor {
@Distributable public class AvailabilityMonitor extends AbstractServiceMonitor {
@Distributable final public class JschSshMonitor extends AbstractServiceMonitor { private SshMonitor m_monitor;
@Distributable(DistributionContext.DAEMON) public final class SMSPingMonitor extends AbstractServiceMonitor { private static final Logger LOG = LoggerFactory.getLogger(SMSPingMonitor.class);
@Distributable public class IcmpMonitor extends AbstractServiceMonitor { private static final Logger LOG = LoggerFactory.getLogger(IcmpMonitor.class);
@Distributable public class MockMonitor extends AbstractServiceMonitor {
@Distributable(DistributionContext.DAEMON) public class MinionRpcMonitor extends AbstractServiceMonitor implements RpcExceptionHandler<PollStatus> { private final Supplier<NodeDao> nodeDao = Suppliers.memoize(() -> BeanUtils.getBean("daoContext", "nodeDao", NodeDao.class));
@Distributable(DistributionContext.DAEMON) public final class DhcpMonitor extends AbstractServiceMonitor {
@Distributable(DistributionContext.DAEMON) final public class SmbMonitor extends AbstractServiceMonitor {
@Distributable(DistributionContext.DAEMON) public class MobileMsgSequenceMonitor extends AbstractServiceMonitor {
@Distributable(DistributionContext.DAEMON) public class NetScalerGroupHealthMonitor extends SnmpMonitorStrategy { private static final String SVC_GRP_MEMBER_STATE = ".1.3.6.1.4.1.5951.4.1.2.7.1.6";
@Distributable(DistributionContext.DAEMON) final public class LaTableMonitor extends SnmpMonitorStrategy { public static final Logger LOG = LoggerFactory.getLogger(LaTableMonitor.class);
@Distributable(DistributionContext.DAEMON) final public class DskTableMonitor extends SnmpMonitorStrategy { public static final Logger LOG = LoggerFactory.getLogger(DskTableMonitor.class);
@Distributable(DistributionContext.DAEMON) final public class PrTableMonitor extends SnmpMonitorStrategy { public static final Logger LOG = LoggerFactory.getLogger(PrTableMonitor.class);