InfluxDB-Client-Simple
view release on metacpan or search on metacpan
lib/InfluxDB/Client/Simple.pm view on Meta::CPAN
my $tags = shift;
my $fields = shift;
my $timestamp = shift;
my %options = @_;
return $self->write( _line_protocol( $measurement, $tags, $fields, $timestamp ), %options );
}
sub _get_influxdb_http_api_uri {
my ( $self, $endpoint ) = @_;
die "Missing argument 'endpoint'" if !$endpoint;
my $uri = URI->new();
$uri->scheme('http');
$uri->host( $self->{host} );
$uri->port( $self->{port} );
$uri->path($endpoint);
return $uri;
}
# Blatantly stolen from InfluxDB::LineProtocol
sub _format_value {
my $k = shift;
my $v = shift;
if ( $v =~ /^(-?\d+)(?:i?)$/ ) {
( run in 0.992 second using v1.01-cache-2.11-cpan-524268b4103 )