Hi,
I'm polling a JSON with th following config file:
input {
http_poller {
urls => {
myresource => "http://192.168.32.40/json/daily.json"
}
request_timeout => 60
interval => 60
codec => "json"
}
}
output {
elasticsearch {}
stdout{codec => rubydebug}
}
It works but all data as cast as string: i thinh it's beacause all numeric values are between quote.
This is stdout:
{
"title" => "METEO",
"location" => "France",
"time" => "14-Jun-2016 09:44",
"lat" => "43° 42.06' N",
"lon" => "001° 02.34' E",
"alt" => "213 metres",
"hardware" => "WMRS200",
"uptime" => "12 days, 20 hours, 27 minutes",
"serverUptime" => "10 days, 1 hour, 8 minutes",
"weewxVersion" => "3.4.0",
"stats" => {
"current" => {
"outTemp" => "19.7",
"windchill" => "19.7",
"heatIndex" => "19.7",
"dewpoint" => "10.9",
"humidity" => "57",
"insideHumidity" => "45",
"barometer" => "1008.6",
"barometerTrendDelta" => "3 hours",
"barometerTrendData" => "-1.4 mbar",
"windSpeed" => "7",
"windDir" => "246",
"windDirText" => "OSO",
"windGust" => "15",
So, how can i filter values to convert string to float ??
Thank you