How do I configure chronograf to run in a specific port?

I am a newbie in InfluxDB.

I have installed InfluxDB and Chronograf in C:/InfluxDB/ and created this structure:

I execute influxd.exe. Everything OK I execute chronograf. Everything OK

Nevertheless, when I am running a Jupyter notebook on port 8888...and try to execute chronograf it crashes because it uses the same port.

I would like to change chronograf to another port for example in 8083.

I have tried to run this command in the cmd: chronograf -p=8083 but it returns to me this:

time="2020-05-28T12:02:41+02:00" level=error msg="Invalid basepath, must follow format \"/mybasepath\"" basepath=invalid component=server

I have read the documentation of Chronograf and found this:

But I still don't understand which URL is referring to, nor how to set BASE_PATH...

I would appreciate a concrete example with a "real" url and not /your_base_path which doesn't help me to understand.

Thank you in advance

Upvotes: 1

Views: 1297

Answers (1)

PeTeeR22r
PeTeeR22r

Reputation: 49

--port option is for setting port number, like this:

chronograf --port=8083

-p is short form of --basepath= option and it's used like this

chronograf --basepath=/chronograf

it causes chronograf to be accessible under following address: http://127.0.0.1:8888/chronograf instead of default http://127.0.0.1:8888

More options can be found here: https://docs.influxdata.com/chronograf/v1.8/administration/config-options/

When running it as a service on linux preferred way to change port is to edit file /etc/default/chronograf to have conntect like this:

PORT=8083

This way modification aren't lost when updating.

Upvotes: 2

Related Questions