Chronograf default port config

Hi guys,

Raspberry Pi3, OSMC install (linux).

This might be really stupid, but I can’t figure out how to change the default port on chronograf?
I want it to startup using port 8008 as 8888 is already in use.

I can run it using the port config from terminal, however I wanted it to start on boot with the port set to 8008, and not 8888.

I couldn’t find a conf.d file or anything anywhere. Can someone point me to it if it exists?

Hey @KyloM !

Chronograf currently has no external configuration except through environment variables or CLI switches. We’ve talked about adding one, but it’s not currently on the roadmap. You’ll need to set the env PORT=8008 or set the switch --port 8008 as you mentioned you’ve done in order to change the default.

Tim

Hi Tim,

Thanks I am kinda a weekend warrior with Linux but wouldn’t a default unit file be useful?

EDIT:
I created my own systemd unit file:

[Unit]
Description=Cronograf on port 8008
After=multi-user.target

[Service]
Type=idle
ExecStart=/usr/bin/chronograf -p=8008

[Install]
WantedBy=multi-user.target

EDIT2:
The above didnt seem to work, even when linked to a script.
I eventually just used crontab
@reboot chronograf -p=8008

Actually your parameter -p=8088 is incorrect:

[17:40:14|telegraf@mon2centos:etc]# chronograf -h|grep port|head -1 --port= The port to listen on for insecure connections, defaults to a random value (default: 8888)

Thus, your line should read as:
ExecStart=/usr/bin/chronograf --port=8088

I’ve built an ansible role to deploy the TIG stack and had to look that one up :slight_smile:
–Jeff

(sorry, I screwed the markdown and cannot get it to work properly :slight_smile: Thing is, --port is the ouput of my grep).