Dane Strandboge
0574163566
build: upgrade to go1.18 ( #23250 )
2022-03-31 16:17:57 -05:00
Sam Arnold
bf7dddaec5
fix: Add back flux CLI ( #20889 )
...
Closes:
https://github.com/influxdata/influxdb/issues/18947
https://github.com/influxdata/influxdb/issues/20852
Similarly to 2.x, the flux CLI now only supports the -execute argument
or commands on stdin. Examples:
```
➜ echo 'import "influxdata/influxdb/v1" v1.databases()' | ./influx -type flux
Result: _result
Table: keys: [organizationID]
organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string
---------------------- ---------------------- ---------------------- -------------------------- ------------ ----------------------
_internal monitor 604800000000000 true
telegraf autogen 0 true
db autogen 0 true
➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1" v1.databases()'
Result: _result
Table: keys: [organizationID]
organizationID:string databaseName:string retentionPolicy:string retentionPeriod:int default:bool bucketId:string
---------------------- ---------------------- ---------------------- -------------------------- ------------ ----------------------
_internal monitor 604800000000000 true
telegraf autogen 0 true
db autogen 0 true
➜ ./influx -type flux -execute 'import "influxdata/influxdb/v1"'
Error (500): error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment
```
Note that tty input is explicitly forbidden, unlike 2.x:
```
➜ ./influx -type flux
Connected to http://localhost:8086 version unknown
InfluxDB shell version: unknown
Interactive flux is not supported. Provide your flux script via stdin or the -execute argument.
```
2021-03-09 09:56:52 -05:00
Brandon Farmer
c2c864d611
feat(influxdb): Add test around CLI proxy path
2020-01-22 14:13:25 -08:00
Brandon Farmer
fe517fd9ce
feat(influxdb): Add proxy path to cli
2020-01-21 10:23:46 -08:00
Jeff Wendling
767b991089
implement using tls configuration
2018-08-02 14:29:07 -06:00
Jonathan A. Sternberg
373506e335
Add retention policy query parameter to queries
2018-04-24 11:21:12 -05:00
Jonathan A. Sternberg
c67a0548a0
Support proxy environment variables in the influx client
...
This also adds support for both the v1 and v2 APIs to set the Proxy
function on the underlying http.Transport.
The functionality for proxy environment variables is provided by the
[http.ProxyFromEnvironment](https://godoc.org/net/http#ProxyFromEnvironment ).
2018-02-11 21:51:58 -06:00
Jonathan A. Sternberg
c6d01e3fcf
Merge pull request #9403 from influxdata/js-9259-influx-cli-port-fix
...
Do not explicitly specify ports 80 or 443 when they are the default port
2018-02-08 12:47:22 -06:00
Jonathan A. Sternberg
fab5c70f6d
Do not explicitly specify ports 80 or 443 when they are the default port
...
The default port for HTTP is 80 and HTTPS is 443. When you host InfluxDB
on a service that uses a reverse proxy, the `Host` header needs to be
exactly correct. Since the host header isn't expecting to see the port
when it is the default, this causes routing to fail.
2018-02-08 10:25:04 -06:00
Martin Geno
6cbbd2be2d
[BUGFIX] client url path
2018-02-07 17:47:18 +01:00
Jonathan A. Sternberg
af23897940
Allow setting the node id in the influx cli program
...
The string `node <n>` can be used to specify which data node the data
should be retrieved from. This uses the `node_id=X` query parameter that
is supported, but wasn't exposed anywhere in the client library.
We use this feature enough internally when attempting to find
inconsistencies or network errors that it is easier if this is just
supported. Otherwise, I continue having to recompile the CLI program
every time I need to do this.
To clear a previously set node, you can use `node 0` or `node clear`.
2018-01-02 11:15:19 -06:00
Jonathan A. Sternberg
2f47c3d28f
Add support for uint64 in the clients
2017-10-05 09:35:06 -05:00
emluque
fa681edcb9
6563 Support Ctrl+C to cancel a running query in the Influx CLI
...
Solved the issue by using context on the http request on the client.
2017-09-01 08:02:27 -05:00
Edd Robinson
fb7388cdfc
Remove dead code from various pkgs
2017-01-17 09:47:34 -08:00
Mark Rushakoff
623bb71b01
Update godoc for the client packages
2016-12-30 11:58:43 -08:00
Edd Robinson
a98ad483ee
Refactor how CLI manages configuration options
2016-12-02 18:26:47 +00:00
oiooj
8ddb11cee2
support unix socket connect for influx CLI
2016-11-30 22:37:56 +08:00
Jonathan A. Sternberg
3afdf3cd94
Merge tag 'v1.0.1'
2016-09-27 17:53:33 -05:00
Jonathan A. Sternberg
954445efd2
Read an invalid JSON response as an error in the influx client
2016-09-13 15:39:26 -05:00
Ben Johnson
8aa224b22d
reduce memory allocations in index
...
This commit changes the index to point to index data in the shards
instead of keeping it in-memory on the heap.
2016-08-16 14:09:00 -06:00
Jonathan A. Sternberg
6f61c0ea4a
Add POST /query endpoint and warning messages for using GET with write operations
...
In order to follow REST a bit more carefully, all write operations
should go through a POST in the future. We still allow read operations
through either GET or POST (similar to the Graphite /render endpoint),
but write operations will trigger a returned warning as part of the JSON
response and will eventually return an error.
Also updates the Golang client libraries to always use POST instead of
GET.
Fixes #6290 .
2016-04-29 09:00:23 -04:00
Jonathan A. Sternberg
42b68d915f
Return a deprecated message when IF NOT EXISTS is used
...
The deprecated message is now attached to a new attribute returned with
the results. This message can then be read by clients to warn a user
about upcoming changes to the query engine.
The `influx` client has already been modified to read this message and
print it out for every format except CSV.
The first warning message is a deprecated message about removing `IF NOT
EXISTS` from `CREATE DATABASE`.
The message will also be printed to the server log.
Fixes #5707 .
2016-04-15 09:17:59 -04:00
Jonathan A. Sternberg
8752d1b1e3
Support chunked queries in the Go InfluxDB client
...
Modify the CLI to always use chunked queries.
2016-03-31 15:30:43 -04:00
Ben Johnson
d9a6a7340f
add canonical paths
2016-02-10 11:30:52 -07:00
Ben Johnson
5a0d1ab7c1
rename influxdb/influxdb to influxdata/influxdb
...
This commit changes all the import and URL references from:
github.com/influxdb/influxdb
to:
github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jason Wilder
dc74bb53d0
Merge pull request #4299 from arussellsaw/feature/client-reject-uint64
...
Reject uint64 Client.Point.Field values
2016-02-08 12:52:17 -07:00
Alex Russell-Saw
5bde459f01
client: reject uint64 Client.Point.Field values
2016-02-01 16:17:47 +00:00
Mike Glazer
c049ebfa43
Support connecting to InfluxDB with the client without HTTPS Verification
...
The V2 client code supports this, however, the V1 client code didn't,
and the argument to support this just had to be added to the CLI
2015-12-29 09:03:16 -08:00
Miguel Xavier Penha Neto
9051451e00
Fix ipv6 parsing in client
...
Old implementation of function ParseConnectionString would parse ipv6 incorrectly
Added a unit test for this
2015-11-01 19:38:54 -02:00
Jason Wilder
0926b19e6b
Prevent creating points with NaN float values
...
Float values are not supported in the existing engine and the tsm1
engines. This changes NewPoint to return an error if a field value
contains a NaN field. It also allows us to validate fields to prevent
other unsupported types from sneaking in through other input plugins.
2015-10-27 17:12:52 -06:00
ch33hau
2924616585
Fix typo and double spaces for comments
2015-10-26 09:37:02 +08:00
Samer Kanjo
a20a0bce56
ref #4098 lint client package
2015-10-13 19:40:51 -05:00
Nathaniel Cook
ac5bd8a6c2
make client.Write default to c.precision if none is given
2015-10-07 15:36:09 -06:00
Cory LaNou
ba830be3b9
actually move influxql.Row* -> models.Row*
2015-09-16 16:32:50 -05:00
Cory LaNou
d19a510ad2
refactor Points and Rows to dedicated packages
2015-09-16 15:33:08 -05:00
Cameron Sparr
6d4319d244
Add function to tsdb.point to get line-protocol string in the correct units
2015-09-16 10:53:59 -07:00
Cory LaNou
c70b503f00
go fmt
2015-09-15 16:09:58 -05:00
Sébastien Bouchex Bellomié
5656ba167f
Added precision support in cmd client
2015-09-11 10:04:18 +02:00
Sébastien Bouchex Bellomié
f8a827d9d2
Added precision support in cmd client
2015-09-09 22:54:57 +02:00
Sébastien Bouchex Bellomié
23a606bafc
Added precision support in cmd client
2015-09-09 22:17:48 +02:00
gunnaraasen
7dc7389e96
Remove dump from client and handler
2015-08-07 11:56:30 -07:00
Cory LaNou
765509bd68
revert breaking change to `client.NewClient` function
2015-08-06 11:46:25 -05:00
Cory LaNou
296f16d634
NewConfig should return a default config without needing params passed to it
2015-08-06 09:19:56 -05:00
Cory LaNou
76367d5161
refactoring based on feedback
2015-08-06 09:19:56 -05:00
Cory LaNou
30a0ca0130
start of a v8 data importer via the cli
2015-08-06 09:19:34 -05:00
Jason Wilder
d5f67c8f8b
Merge pull request #3172 from rdallman/master
...
client: fixes nil map assignment when writing batch points out
2015-06-30 10:41:22 -06:00
Reed Allman
7fac798b93
fixes nil map assignment when writing batch points out
2015-06-28 17:45:47 -07:00
Joseph Crail
5fccee3d16
Fix spelling errors in comments and strings.
2015-06-28 02:54:34 -04:00
Evan Phoenix
a00c6215ce
Copy an Batch tags to each point before marshalling
2015-06-25 14:08:38 -07:00
gunnaraasen
2d712733e9
Clean up INSERT INTO parsing and tests
2015-06-09 15:45:26 -07:00