Forum Discussion
Chris_Wallis
2 years agoLM Champion
Hi Jared, Apologies for the delayed response.
It’s not something I have lots of experience with (To be honest I’d usually perform this logic in the collection script itself and not complex datapoint) but I may have a working solution:
Essentially, I explicitly defined the output as a float before dividing as I know Groovy has a tendency to label everything as strings by default.
wv = "##WILDVALUE##"
if(wv=~"AWS"){
bps = output["BYTESRECEIVEDPERSEC"]
bps_scale = (output["BYTESRECEIVEDPERSEC"].toFloat())/1024
return bps_scale
}
else{
return 0
}
(Note the default datapoint is a derive so I needed to make it a gauge as thats whats being pulled using the OUTPUT[] method.
Related Content
- 5 months ago
- 4 months ago
- 5 months ago