Hi, I'm using postgresql_extensible to store some query of my database in 
influxdb but I have had some problems with that.

For example I have the following config 

 [[inputs.postgresql_extensible.query]]
     sqlquery="select sum(ip.amount) from payments ip where ip.status = 
'completed' ;"
     version=901
     withdbname=false
     tagvalue=""
     measurement="payments"

If I run "telegraf -config /etc/telegraf/telegraf.conf -test" , I will get:

> payments,db=postgres,host=db,server=host\=postgresql\ user\=telegraf\ 
> dbname\=test sum="238000.00" 1477326567000000000

Here you can see that the "sum" is stored as "string" instead of float (or 
int). I checked and that query returns "numeric" as type.

I already know that I can cast the select to real or bigint to obtain the 
desaire type in influxdb but i don't know if this is the 
only solution or there is another, maybe I need to configure something 
somewhere.

Thanks.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/b9807cd5-fbe9-4d85-ba6c-60544c078972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to