Initial setup questions


I want to deploy an initial Chronograf/Telegraf/InfluxDB/Kapacitor setup.

I want to configure them all so that when someone first enters Chronograf there is no prompt to connect to databases and such. Instead brings up some graphs.

For example, when I first enter Chronograf, I get the Add a New Source screen to connect to the telegraf database.

I tried this
/usr/bin/chronograf --host --port 8885 --basepath /chronograf --influxdb-url=http:///localhost:8086 --kapacitor-url=http://localhost:9092 --prefix-routes -b /var/lib/chronograf/chronograf-v1.db -c /usr/share/chronograf/canned

But I it doesn’t keep that from coming up.

After that if I wander into Alerts it tells me that I have to Configure Kapacitor. Again the defaults are fine but I don’t want my users to have to click on these.

So, are there commands I can run as part of install/initialization that would keep these screens from coming up?


Hi -

Yes, there is a way you can configure Chronograf to allow for your users to be able to set up and install Chronograf without needing to deal with connecting to Kapacitor or a DB source.

You would need to define either in your
env vars: RESOURCES_PATH=/var/lib/chronograf
or in the CLI: --resources-path

That would point to a directory that contains your .src (this defines the source) and .kap files (this defines a kapacitor).

For example:
You can create a source that connects to influx on localhost with the username/password, admin/password

export USER=admin
export PASSWORD=password
export INFLUX_URL=http://localhost:8086

./chronograf --resources-path=/tmp

**Note: Putting the resources in /tmp is not recommended, since files in /tmp are deleted on reboot

Define the .src file: /tmp/default.src

  "id": "100000",
  "name": "My Influx",
  "username": "{{ .USER }}",
  "password": "{{ .PASSWORD }}",
  "url": "{{ .INFLUX_URL }}",
  "type": "influx",
  "insecureSkipVerify": false,
  "default": true,
  "telegraf": "telegraf",
  "organization": "default"

Define the .kap file: /tmp/defalut.kap

  "id": 110000,
  "srcId": 100000,
  "name": "My Kapacitor",
  "url": "{{ .KAPACITOR_URL }}",
  "active": true,
  "organization": "default"

If you are not using multi-tenancy then you would not need the “organization” key and default value. Hope this helps!


Thanks for the quick response.

Is this all stuff I should have been able to find by myself in the documentation>



I don’t think this is as yet included in the documentation. We will try to update the documentation now to include this however. Thanks for bringing it to our attention!