public class TcaCollectionResource extends AbstractCollectionResource
The resource type is fixed to juniperTcaEntry
This requires to define a datacollection-group like this:
<datacollection-group name="Juniper TCA"> <resourceType name="juniperTcaEntry" label="Juniper TCA Entry" resourceLabel="Peer ${index}"> <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/> <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/> </resourceType> </datacollection-group>
Note: the persistenceSelectorStrategy and storageStrategy won't be used by the collector.
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_TYPE_NAME
The Constant RESOURCE_TYPE_NAME.
|
m_agent
Modifier | Constructor and Description |
---|---|
protected |
TcaCollectionResource(CollectionAgent agent,
String peerAddress)
Instantiates a new TCA collection resource.
|
Modifier and Type | Method and Description |
---|---|
String |
getInstance()
Returns the name of the instance this CollectionResource represents.
|
String |
getLabel()
getLabel
|
String |
getParent()
Returns the name of the parent resource.
|
File |
getResourceDir(RrdRepository repository)
getResourceDir
|
String |
getResourceTypeName()
Returns a string which indicates what type of resource.
|
TimeKeeper |
getTimeKeeper()
Returns a not-null time tracker instance when this resource requires to use a special timestamp when updating RRDs/JRBs.
|
int |
getType()
getType
|
boolean |
rescanNeeded()
rescanNeeded
|
void |
setAttributeValue(TcaCollectionAttributeType type,
String value)
Sets the attribute value.
|
void |
setTimeKeeper(TimeKeeper timeKeeper)
Sets the time keeper.
|
boolean |
shouldPersist(ServiceParameters params)
shouldPersist
|
String |
toString() |
addAttribute, getGroup, getOwnerName, visit
public static final String RESOURCE_TYPE_NAME
protected TcaCollectionResource(CollectionAgent agent, String peerAddress)
agent
- the collection agentpeerAddress
- the TCA peer addresspublic String getResourceTypeName()
CollectionResource
String
object.public String getParent()
CollectionResource
String
object.public String getInstance()
CollectionResource
String
object.public String getLabel()
AbstractCollectionResource
getLabel
getLabel
in interface CollectionResource
getLabel
in class AbstractCollectionResource
String
object.public int getType()
AbstractCollectionResource
getType
getType
in interface CollectionResource
getType
in class AbstractCollectionResource
public boolean rescanNeeded()
AbstractCollectionResource
rescanNeeded
rescanNeeded
in interface CollectionResource
rescanNeeded
in class AbstractCollectionResource
public boolean shouldPersist(ServiceParameters params)
AbstractCollectionResource
shouldPersist
shouldPersist
in interface CollectionResource
shouldPersist
in class AbstractCollectionResource
params
- a org.opennms.netmgt.collectd.ServiceParameters
object.public File getResourceDir(RrdRepository repository)
AbstractCollectionResource
getResourceDir
getResourceDir
in interface ResourceIdentifier
getResourceDir
in class AbstractCollectionResource
repository
- a RrdRepository
object.File
object.public TimeKeeper getTimeKeeper()
CollectionResource
getTimeKeeper
in interface CollectionResource
getTimeKeeper
in class AbstractCollectionResource
TimeKeeper
object.public void setTimeKeeper(TimeKeeper timeKeeper)
timeKeeper
- the new time keeperpublic void setAttributeValue(TcaCollectionAttributeType type, String value)
type
- the typevalue
- the valueCopyright © 2015. All Rights Reserved.