Resource Type Labels

From OpenNMS
Jump to: navigation, search

Resource Type Labels

The resourceLabel attribute for resourceType in a datacollection configuration file has a few string modifiers that can alter the display of the label when seen on the Resource Graph page.

${index} 
Returns the instance
${subIndex(X,Y)} 
Return a subsection of instance of length Y starting at X.
${subIndex(X,n)} 
Return a subsection of instance starting at X, with the length determined by the value at X.
${subIndex(n,X)} 
Return a subsection of instance starting at the OID after the prior n ending location, with a length of X.
${subIndex(n,n)} 
Return a subsection of instance starting at the OID after the prior n ending location, with the length determined by the value of this starting OID.
${string(index))} 
Returns a string converting each OID from decimal to equivalent ASCII character.
${string(subIndex(X,Y))} 
returns a subsection of the index converting the OIDs from numeric value to the corresponding ASCII character. See the earlier subIndex() entries for how the they are handled.
${hex(index)} 
returns the index after converting each OID from decimal to hex.
${hex(subIndex(X,Y))} 
returns the subsection of index after converting each OID from decimal to hex. See the earlier subIndex() entries for how they are handled.

Also see the junit tests in opennms-dao/src/test/java/org/opennms/netmgt/dao/support/GenericIndexResourceTypeTest.java in the opennms source repository.

http://opennms.git.sourceforge.net/git/gitweb.cgi?p=opennms/opennms;a=blob;f=opennms-dao/src/test/java/org/opennms/netmgt/dao/support/GenericIndexResourceTypeTest.java