# Remove % from the field

**URL:** https://discuss.elastic.co/t/remove-from-the-field/161441
**Category:** Logstash
**Created:** [December 19, 2018, 5:13am UTC](https://discuss.elastic.co/t/remove-from-the-field/161441 "2018-12-19T05:13:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sridhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sridhar/32/64860_2.png) [@Sridhar](https://discuss.elastic.co/u/Sridhar)
#### Post date: [December 19, 2018, 5:13am UTC](https://discuss.elastic.co/t/remove-from-the-field/161441/1 "2018-12-19T05:13:55Z")

</div>

Hi..  
Below is the json output

{  
"\_index": "itrs-source-mantas2018-12-344",  
"\_type": "doc",  
"\_id": "AWeZyKeDpSGftotd3dLO",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"operation": "update",  
"@version": "1",  
"data": {  
"sampleTime": "2018-12-10T20:21:59.160Z",  
"name": "Average\_cpu",  
"target": {  
"filter": {  
"osType": "Linux",  
"pluginName": "CPU"  
},  
"sampler": "CPU",  
"gateway": "MANTAS\_ECS\_GDCE",  
"dataview": "CPU",  
"managedEntity": "HKLPAPMTC02-7036",  
"probe": "HKLPAPMTC02-7036",  
"type": "Core\_Linux"  
},  
"row": {  
"percentIrq": "0.00 %",  
"state": "",  
**"percentUtilisation": "2.81 %",**  
"percentSoftIrq": "0.07 %",  
"clockSpeed": "",  
"percentUserTime": "1.56 %",  
"percentKernelTime": "0.94 %",  
"percentIdle": "97.19 %",  
"type": "",  
"percentWaitTime": "0.25 %"  
}  
},  
"@timestamp": "2018-12-10T20:22:02.894Z"  
},  
"fields": {  
"@timestamp": [  
1544473322894  
],  
"data.sampleTime": [  
1544473319160  
]  
},  
"highlight": {  
"data.name.keyword": [  
"@kibana-highlighted-field@Average\_cpu@/kibana-highlighted-field@"  
],  
"data.name": [  
"@kibana-highlighted-field@Average\_cpu@/kibana-highlighted-field@"  
]  
},  
"sort": [  
1544473322894  
]  
}

## I want to remove the % special character and convert the percentUtilisation as float.

## I used the below logstash code.

filter {  
mutate {  
gsub =\> ["[\_source][data][row][percentUtilisation]", " \%", "" ]  
convert =\> { "[\_source][data][row][percentUtilisation]" =\> "float" }  
}  
}

## but its not removing the % and coversion is not happening.

Please help..!!!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 16, 2019, 5:13am UTC](https://discuss.elastic.co/t/remove-from-the-field/161441/2 "2019-01-16T05:13:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
