Correct help text and default for server URL arg
Not sure why I thought the InfluxDB 2.x client library accepted a bare host/port for the server, in addition to a full URL. It does not, as reported in issue #49. The 1.x client did, but it didn't take a URL for server, anyway. This corrects the help text to indicate the URL argument specifies a... URL, and corrects the default to be something that could actually work.
This commit is contained in:
parent
87e1f24e77
commit
6ab737165e
1 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ from influxdb_client import InfluxDBClient, WriteOptions, WritePrecision
|
||||||
|
|
||||||
import dish_common
|
import dish_common
|
||||||
|
|
||||||
HOST_URL = "localhost:8086"
|
URL_DEFAULT = "http://localhost:8086"
|
||||||
BUCKET_DEFAULT = "starlinkstats"
|
BUCKET_DEFAULT = "starlinkstats"
|
||||||
BULK_MEASUREMENT = "spacex.starlink.user_terminal.history"
|
BULK_MEASUREMENT = "spacex.starlink.user_terminal.history"
|
||||||
FLUSH_LIMIT = 6
|
FLUSH_LIMIT = 6
|
||||||
|
@ -51,14 +51,14 @@ def handle_sigterm(signum, frame):
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = dish_common.create_arg_parser(output_description="write it to an InfluxDB 2.0 database")
|
parser = dish_common.create_arg_parser(output_description="write it to an InfluxDB 2.x database")
|
||||||
|
|
||||||
group = parser.add_argument_group(title="InfluxDB 2.0 database options")
|
group = parser.add_argument_group(title="InfluxDB 2.x database options")
|
||||||
group.add_argument("-u",
|
group.add_argument("-u",
|
||||||
"--url",
|
"--url",
|
||||||
default=HOST_URL,
|
default=URL_DEFAULT,
|
||||||
dest="url",
|
dest="url",
|
||||||
help="URL or IP AND Port of the InfluxDB 2.0 Host, default: " + HOST_URL)
|
help="URL of the InfluxDB 2.x server, default: " + URL_DEFAULT)
|
||||||
group.add_argument("-T", "--token", help="Token to access the bucket")
|
group.add_argument("-T", "--token", help="Token to access the bucket")
|
||||||
group.add_argument("-B",
|
group.add_argument("-B",
|
||||||
"--bucket",
|
"--bucket",
|
||||||
|
|
Loading…
Reference in a new issue