Need help in writing the right conf file for the data displayed here. Getting the splittable errors
Input file --- from the url
<clusterMetrics>
<appsSubmitted>12434</appsSubmitted>
<appsCompleted>12279</appsCompleted>
<appsPending>0</appsPending>
<appsRunning>9</appsRunning>
<appsFailed>13</appsFailed>
<appsKilled>133</appsKilled>
<reservedMB>0</reservedMB>
<availableMB>1050624</availableMB>
<allocatedMB>147456</allocatedMB>
<reservedVirtualCores>0</reservedVirtualCores>
<availableVirtualCores>60</availableVirtualCores>
<allocatedVirtualCores>24</allocatedVirtualCores>
<containersAllocated>24</containersAllocated>
<containersReserved>0</containersReserved>
<containersPending>0</containersPending>
<totalMB>1198080</totalMB>
<totalVirtualCores>84</totalVirtualCores>
<totalNodes>3</totalNodes>
<lostNodes>0</lostNodes>
<unhealthyNodes>0</unhealthyNodes>
<decommissionedNodes>0</decommissionedNodes>
<rebootedNodes>0</rebootedNodes>
<activeNodes>3</activeNodes>
</clusterMetrics>
Code:
Input used
exec {
type => "metrics"
command => "curl -s http://13.11.xxx.234:8088/ws/v1/cluster/metrics"
interval => "5"
codec => "json"
}
filter used
if [type] == "metrics"
{
split {
field => "metrics[clusterMetrics]"
remove_field => [ "command" ]
}
}
Output used
elasticsearch {
index => "yarn-metrics-%{+YYYY.MM.dd}"
document_type => "doc"
codec => "json"
servername...
username
password..
}