Package org.jmxtrans.agent
Interface ResultNameStrategy
- All Known Implementing Classes:
JConsoleResultNameStrategyImpl,ResultNameStrategyImpl
public interface ResultNameStrategy
Build a QueryResult.name from a collected metric (Query).
Build name must be escaped to be compatible with all OutputWriter.
The approach is to escape non alpha-numeric chars.
Expressions support '#' based keywords (e.g.
#hostname#) and with '%' based variables mapped to objectname properties.
Supported '#' based 'functions':
| Function | Description | Sample |
|---|---|---|
#hostname# |
localhost - hostname InetAddress.getHostName() |
|
#reversed_hostname# |
reversed localhost - hostname InetAddress.getHostName() |
|
#escaped_hostname# |
localhost - hostname InetAddress.getHostName() with '.' replaced by '_' |
|
#canonical_hostname# |
localhost - canonical hostname InetAddress.getCanonicalHostName() |
server1.ecommerce.mycompany.com |
#reversed_canonical_hostname# |
reversed localhost - canonical hostname InetAddress.getCanonicalHostName() |
com.mycompany.ecommerce.server1 |
#escaped_canonical_hostname# |
localhost - canonical hostname InetAddress.getCanonicalHostName() with '.' replaced by '_' |
server1_ecommerce_mycompany_com |
#hostaddress# |
localhost - hostaddress InetAddress.getHostAddress() |
|
#escaped_hostname# |
localhost - hostaddress InetAddress.getHostAddress() with '.' replaced by '_' |
- Author:
- Cyrille Le Clerc
-
Method Summary
Modifier and Type Method Description StringgetResultName(Query query, ObjectName objectName, String attribute, String compositeDataKey, Integer position)voidpostConstruct(Map<String,String> settings)
-
Method Details
-
getResultName
-
postConstruct
-