Safe Haskell | None |
---|---|
Language | Haskell2010 |
- writeData :: (CanInflux m e, IsDb db, ToLine l) => InfluxDBConfig -> db -> Precision -> l -> m ()
- queryData :: (CanInflux m e, IsDb db) => InfluxDBConfig -> db -> Precision -> InfluxQuery -> m Value
- queryDataToCSV :: (CanInflux m e, IsDb db) => InfluxDBConfig -> db -> Precision -> InfluxQuery -> m ByteString
Documentation
writeData :: (CanInflux m e, IsDb db, ToLine l) => InfluxDBConfig -> db -> Precision -> l -> m () Source #
Push some new data to Influx.
The ToLine
typeclass isn't safe at the moment, so you're on your own
when it comes to meeting the Line Protocol requirements for InfluxDB
queryData :: (CanInflux m e, IsDb db) => InfluxDBConfig -> db -> Precision -> InfluxQuery -> m Value Source #
Ask Influx for some data or run a Downsample query. The queries are not type safe or verified for correctness, you're in the wild west here.
queryDataToCSV :: (CanInflux m e, IsDb db) => InfluxDBConfig -> db -> Precision -> InfluxQuery -> m ByteString Source #
Ask Influx for some data and return any results in CSV format: Query:
curl -H "Accept: applicationcsv" -G 'http:localhost:8086query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" LIMIT 3'
Result:
name,tags,time,tag1,tag2,value mymeas,,1478030187213306198,blue,tag2,23 mymeas,,1478030189872408710,blue,tag2,44 mymeas,,1478030203683809554,blue,yellow,101