public final class TimeseriesUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
WILDCARD_INDEX |
static int |
WILDCARD_INDEX_NO |
Constructor and Description |
---|
TimeseriesUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addIndicesToAttributes(ResourcePath path,
Map<String,String> attributes)
Extends the attribute map with indices used by the
TimeseriesResourceStorageDao . |
static org.opennms.integration.api.v1.timeseries.Sample |
createSampleForIndexingStrings(String resourceId,
Map<String,String> attributes)
Creates a sample used to index string attributes.
|
static String |
toMetricName(String resourceId)
Extracts the metric name from the resource id.
|
static String |
toResourceId(ResourcePath path)
Converts a
ResourcePath to a Newts resource id. |
static ResourcePath |
toResourcePath(String resourceId)
Converts a Newts resource id to a
ResourcePath . |
public static final int WILDCARD_INDEX_NO
public static final String WILDCARD_INDEX
public static void addIndicesToAttributes(ResourcePath path, Map<String,String> attributes)
TimeseriesResourceStorageDao
.
A resource path of the form [a, b, c, d] will be indexed with:
public static String toResourceId(ResourcePath path)
ResourcePath
to a Newts resource id.path
- path to convertpublic static ResourcePath toResourcePath(String resourceId)
ResourcePath
.resourceId
- Newts resource idpublic static String toMetricName(String resourceId)
resourceId
- Newts resource idCopyright © 2021. All rights reserved.