![]() |
Consumption Analytics Documentation |
Data feed configuration for the SmartJsonCollector.
<bean class="com.cloudcruiser.batch.collect.JsonFeedConfig">
<property name="variables"> |
|
Sets a list of element to variable mappings. The output variables may then be specified as input for subsequent output mappings. To specify a variable as input, set the input to ' |
|
<property name="JasonPathOutputs" /> |
|
Sets a list of child node mappings for recursive processing. |
|
Defines the default character set for reading input. The default encoding is significant when auto-detection determines multiple possible encoding schemes. Otherwise, the detected encoding will take precedent. The default value is For more information, see the Java SE Documentation on encoding. |
|
Defines what the collector considers a line end character. Possible values are
When an explicit line ending is set, any alternate combination of EOL characters encountered will be ignored. The default is |
|
<property name="inputs"> |
|
Sets the list of input fields to collect data from. These are only applicable to mixed mode collection where JSON encoded objects appear in flat file records. |
<bean class="com.cloudcruiser.batch.collect.JsonFeedConfig">
<property name="outputs">
<list>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="customer.name" />
<property name="label" value="customer" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="service.vmName" />
<property name="label" value="vmName" />
</bean>
</list>
</property>
<property name="jsonPathOutputs">
<list>
<bean class="com.cloudcruiser.batch.collect.JsonPathOutputMapping">
<property name="jsonPathExpression" value="$.service.compute" />
<property name="outputs">
<list>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="osType" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="RESOURCE" />
<property name="input" value="ramGB" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="RESOURCE" />
<property name="input" value="cpuCount" />
</bean>
</list>
</property>
</bean>
<bean class="com.cloudcruiser.batch.collect.JsonPathOutputMapping">
<property name="jsonPathExpression" value="$.service.disks" />
<property name="outputs">
<list>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="name" />
<property name="label" value="diskName" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="RESOURCE" />
<property name="input" value="sizeGB" />
<property name="label" value="diskGB" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
<bean id="feedConfig" class="com.cloudcruiser.batch.collect.JsonFeedConfig">
<property name="encoding" value="UTF-9"/>
<property name="lineEnd" value="ANY"/>
<property name="dateTimePattern" value="yyyy-MM-dd'T'HH:mm:ssZ" />
<property name="inputs">
<list>
<bean class="com.cloudcruiser.batch.collect.InputField">
<property name="regularExpression" value="^[0-9,-]*T[0-9,:]*[+,-][0-9,:]*" />
<property name="name" value="logTimestamp" />
</bean>
</list>
</property>
<property name="outputs">
<list>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="USAGE_END" />
<property name="input" value="logTimestamp" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="usage.account" />
<property name="label" value="account" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="IDENTIFIER" />
<property name="input" value="usage.node" />
<property name="label" value="nodeName" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="RESOURCE" />
<property name="input" value="usage.cpu_alloc" />
<property name="label" value="cpuCount" />
</bean>
<bean class="com.cloudcruiser.batch.collect.OutputField">
<property name="cctype" value="RESOURCE" />
<property name="input" value="usage.ram_alloc" />
<property name="label" value="memoryMB" />
</bean>
</list>
</property>
</bean>
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP