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 long
getCollectableServiceCount()
protected java.util.List<org.opennms.netmgt.collectd.CollectableService>
getCollectableServices()
java.util.Set<java.lang.String>
getCollectorNames()
getCollectorNamesEventIpcManager
getEventIpcManager()
getEventIpcManagerstatic java.lang.String
getLoggingCategory()
PersisterFactory
getPersisterFactory()
Scheduler
getScheduler()
getSchedulerServiceCollector
getServiceCollector(java.lang.String svcName)
getServiceCollectorjava.util.Collection<CollectionSpecification>
getSpecificationsForInterface(OnmsIpInterface iface, java.lang.String svcName)
getSpecificationsForInterfaceThresholdingService
getThresholdingService()
protected void
handleInsufficientInfo(InsufficientInformationException e)
handleInsufficientInfostatic CollectionInstrumentation
instrumentation()
instrumentationvoid
onEvent(IEvent event)
Process a sent event.protected void
onInit()
onInitprotected void
onPause()
onPauseprotected void
onResume()
onResumeprotected void
onStart()
onStartprotected void
onStop()
onStopvoid
setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManagervoid
setLocationAwareCollectorClient(LocationAwareCollectorClient locationAwareCollectorClient)
void
setPersisterFactory(PersisterFactory persisterFactory)
void
setPollOutagesDao(ReadablePollOutagesDao pollOutagesDao)
void
setScheduler(Scheduler scheduler)
setSchedulervoid
setServiceCollector(java.lang.String svcName, ServiceCollector collector)
setServiceCollectorvoid
setServiceCollectorRegistry(ServiceCollectorRegistry serviceCollectorRegistry)
void
setThresholdingService(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
CollectionInstrumentation
object.
-
onInit
protected void onInit()
onInit
- Specified by:
onInit
in classAbstractServiceDaemon
-
setEventIpcManager
public void setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManager
- Parameters:
eventIpcManager
- aEventIpcManager
object.
-
getEventIpcManager
public EventIpcManager getEventIpcManager()
getEventIpcManager
- Returns:
- a
EventIpcManager
object.
-
getThresholdingService
public ThresholdingService getThresholdingService()
-
setThresholdingService
public void setThresholdingService(ThresholdingService thresholdingService)
-
onStart
protected void onStart()
onStart
- Overrides:
onStart
in classAbstractServiceDaemon
-
onStop
protected void onStop()
onStop
- Overrides:
onStop
in classAbstractServiceDaemon
-
onPause
protected void onPause()
onPause
- Overrides:
onPause
in classAbstractServiceDaemon
-
onResume
protected void onResume()
onResume
- Overrides:
onResume
in classAbstractServiceDaemon
-
getSpecificationsForInterface
public java.util.Collection<CollectionSpecification> getSpecificationsForInterface(OnmsIpInterface iface, java.lang.String svcName)
getSpecificationsForInterface
- Parameters:
iface
- aOnmsIpInterface
object.svcName
- aString
object.- Returns:
- a
Collection
object.
-
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:
onEvent
in interfaceEventListener
- Parameters:
event
- aIEvent
object.
-
handleInsufficientInfo
protected void handleInsufficientInfo(InsufficientInformationException e)
handleInsufficientInfo
- Parameters:
e
- aInsufficientInformationException
object.
-
setScheduler
public void setScheduler(Scheduler scheduler)
setScheduler
- Parameters:
scheduler
- aScheduler
object.
-
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
- aString
object.collector
- aServiceCollector
object.
-
getServiceCollector
public ServiceCollector getServiceCollector(java.lang.String svcName)
getServiceCollector
- Parameters:
svcName
- aString
object.- Returns:
- a
ServiceCollector
object.
-
getPersisterFactory
public PersisterFactory getPersisterFactory()
-
setPersisterFactory
public void setPersisterFactory(PersisterFactory persisterFactory)
-
getCollectorNames
public java.util.Set<java.lang.String> getCollectorNames()
getCollectorNames
- Returns:
- a
Set
object.
-
getLoggingCategory
public static java.lang.String getLoggingCategory()
-
getCollectableServiceCount
public long getCollectableServiceCount()
-
setPollOutagesDao
public void setPollOutagesDao(ReadablePollOutagesDao pollOutagesDao)
-
-