#!/usr/bin/perl # use strict; use CGI::Carp qw(fatalsToBrowser); use InfluxDB; my $ix = InfluxDB->new( host => '127.0.0.1', port => 8086, username => 'root', password => 'root', database => 'pv_wetter', ); $ix->write_points( data => { name => "test", columns => [qw(time forecast)], points => [ [1448956800,217.18], [1448957700,282.99], [1448958600,368.12], [1448959500,438.97], [1448960400,507.04], [1448961300,572.33], [1448962200,450.62], [1448963100,492.12], [1448964000,529.68], [1448964900,563.27], [1448965800,505.44], [1448966700,527.34], ], }, ) or die "write_points: " . $ix->errstr; my $rs = $ix->query( q => 'select * from test ', time_precision => 's', ) or die "query: " . $ix->errstr;