Package org.opennms.netmgt.collectd
Class Collectd
- java.lang.Object
-
- org.opennms.netmgt.daemon.AbstractServiceDaemon
-
- org.opennms.netmgt.collectd.Collectd
-
- All Implemented Interfaces:
Fiber,PausableFiber,SpringServiceDaemon,EventListener,ServiceDaemon,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class Collectd extends AbstractServiceDaemon implements EventListener
Collectd class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
-
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
-
-
Constructor Summary
Constructors Constructor Description Collectd()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCollectableServiceCount()protected java.util.List<org.opennms.netmgt.collectd.CollectableService>getCollectableServices()java.util.Set<java.lang.String>getCollectorNames()getCollectorNamesEventIpcManagergetEventIpcManager()getEventIpcManagerstatic java.lang.StringgetLoggingCategory()PersisterFactorygetPersisterFactory()SchedulergetScheduler()getSchedulerServiceCollectorgetServiceCollector(java.lang.String svcName)getServiceCollectorjava.util.Collection<CollectionSpecification>getSpecificationsForInterface(OnmsIpInterface iface, java.lang.String svcName)getSpecificationsForInterfaceThresholdingServicegetThresholdingService()protected voidhandleInsufficientInfo(InsufficientInformationException e)handleInsufficientInfostatic CollectionInstrumentationinstrumentation()instrumentationvoidonEvent(IEvent event)Process a sent event.protected voidonInit()onInitprotected voidonPause()onPauseprotected voidonResume()onResumeprotected voidonStart()onStartprotected voidonStop()onStopvoidsetEventIpcManager(EventIpcManager eventIpcManager)setEventIpcManagervoidsetLocationAwareCollectorClient(LocationAwareCollectorClient locationAwareCollectorClient)voidsetPersisterFactory(PersisterFactory persisterFactory)voidsetPollOutagesDao(ReadablePollOutagesDao pollOutagesDao)voidsetScheduler(Scheduler scheduler)setSchedulervoidsetServiceCollector(java.lang.String svcName, ServiceCollector collector)setServiceCollectorvoidsetServiceCollectorRegistry(ServiceCollectorRegistry serviceCollectorRegistry)voidsetThresholdingService(ThresholdingService thresholdingService)-
Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon
afterPropertiesSet, destroy, getName, getStatus, getStatusText, init, isPaused, isRunning, isStarting, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.events.api.EventListener
getName
-
-
-
-
Method Detail
-
instrumentation
public static CollectionInstrumentation instrumentation()
instrumentation
- Returns:
- a
CollectionInstrumentationobject.
-
onInit
protected void onInit()
onInit
- Specified by:
onInitin classAbstractServiceDaemon
-
setEventIpcManager
public void setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManager
- Parameters:
eventIpcManager- aEventIpcManagerobject.
-
getEventIpcManager
public EventIpcManager getEventIpcManager()
getEventIpcManager
- Returns:
- a
EventIpcManagerobject.
-
getThresholdingService
public ThresholdingService getThresholdingService()
-
setThresholdingService
public void setThresholdingService(ThresholdingService thresholdingService)
-
onStart
protected void onStart()
onStart
- Overrides:
onStartin classAbstractServiceDaemon
-
onStop
protected void onStop()
onStop
- Overrides:
onStopin classAbstractServiceDaemon
-
onPause
protected void onPause()
onPause
- Overrides:
onPausein classAbstractServiceDaemon
-
onResume
protected void onResume()
onResume
- Overrides:
onResumein classAbstractServiceDaemon
-
getSpecificationsForInterface
public java.util.Collection<CollectionSpecification> getSpecificationsForInterface(OnmsIpInterface iface, java.lang.String svcName)
getSpecificationsForInterface
- Parameters:
iface- aOnmsIpInterfaceobject.svcName- aStringobject.- Returns:
- a
Collectionobject.
-
getCollectableServices
protected java.util.List<org.opennms.netmgt.collectd.CollectableService> getCollectableServices()
-
onEvent
public void onEvent(IEvent event)
Process a sent event. This method is invoked by the JMS topic session when a new event is available for processing. Currently only text based messages are processed by this callback. Each message is examined for its Universal Event Identifier and the appropriate action is taking based on each UEI.- Specified by:
onEventin interfaceEventListener- Parameters:
event- aIEventobject.
-
handleInsufficientInfo
protected void handleInsufficientInfo(InsufficientInformationException e)
handleInsufficientInfo
- Parameters:
e- aInsufficientInformationExceptionobject.
-
setScheduler
public void setScheduler(Scheduler scheduler)
setScheduler
- Parameters:
scheduler- aSchedulerobject.
-
setServiceCollectorRegistry
public void setServiceCollectorRegistry(ServiceCollectorRegistry serviceCollectorRegistry)
-
setLocationAwareCollectorClient
public void setLocationAwareCollectorClient(LocationAwareCollectorClient locationAwareCollectorClient)
-
setServiceCollector
public void setServiceCollector(java.lang.String svcName, ServiceCollector collector)setServiceCollector
- Parameters:
svcName- aStringobject.collector- aServiceCollectorobject.
-
getServiceCollector
public ServiceCollector getServiceCollector(java.lang.String svcName)
getServiceCollector
- Parameters:
svcName- aStringobject.- Returns:
- a
ServiceCollectorobject.
-
getPersisterFactory
public PersisterFactory getPersisterFactory()
-
setPersisterFactory
public void setPersisterFactory(PersisterFactory persisterFactory)
-
getCollectorNames
public java.util.Set<java.lang.String> getCollectorNames()
getCollectorNames
- Returns:
- a
Setobject.
-
getLoggingCategory
public static java.lang.String getLoggingCategory()
-
getCollectableServiceCount
public long getCollectableServiceCount()
-
setPollOutagesDao
public void setPollOutagesDao(ReadablePollOutagesDao pollOutagesDao)
-
-