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.collection.support.PersistAllSelectorStrategy"/>
<storageStrategy class="org.opennms.netmgt.collection.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_agentRESOURCE_TYPE_IF, RESOURCE_TYPE_NODE| 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 |
getInterfaceLabel()
getInterfaceLabel
|
Path |
getPath()
Retrieves path for the resource, relative to the root of the
associated
RrdRepository. |
String |
getResourceTypeName()
Returns a string which indicates what type of resource.
|
TimeKeeper |
getTimeKeeper()
Returns a not-null
TimeKeeper instance when this resource requires to use a special timestamp when updating RRDs/JRBs. |
void |
setAttributeValue(TcaCollectionAttributeType type,
String value)
Sets the attribute value.
|
void |
setTimeKeeper(TimeKeeper timeKeeper)
Sets the time keeper.
|
String |
toString() |
addAttribute, getGroup, getOwnerName, getParent, rescanNeeded, shouldPersist, visitpublic static final String RESOURCE_TYPE_NAME
protected TcaCollectionResource(CollectionAgent agent, String peerAddress)
agent - the collection agentpeerAddress - the TCA peer addresspublic String getResourceTypeName()
CollectionResourceString object.public String getInstance()
CollectionResourceCollectionResource represents. For node level resources, this will be null
to indicate the default instance. For interface level resources, some label unique to the node (ifIndex probably).
For Generic resources (e.g. the SNMP GenericIndexResource), this will be some identifying label, probably the index in the table.
This value is used by the StorageStrategy implementations to figure out the label for the resource which
is used in constructing its RRD directory.String object.public String getInterfaceLabel()
AbstractCollectionResourcegetInterfaceLabel
getInterfaceLabel in interface CollectionResourcegetInterfaceLabel in class AbstractCollectionResourceString object.public Path getPath()
AbstractCollectionResourceRrdRepository.getPath in interface ResourceIdentifiergetPath in class AbstractCollectionResourcePath object.public TimeKeeper getTimeKeeper()
CollectionResourceTimeKeeper instance when this resource requires to use a special timestamp when updating RRDs/JRBs.
If the resource doesn't need a special TimeKeeper it should return null.getTimeKeeper in interface CollectionResourcegetTimeKeeper in class AbstractCollectionResourceDefaultTimeKeeper should be used.public void setTimeKeeper(TimeKeeper timeKeeper)
timeKeeper - the new time keeperpublic void setAttributeValue(TcaCollectionAttributeType type, String value)
type - the typevalue - the valueCopyright © 2020. All rights reserved.