Variable Updates and Instructional Changes
Variables: - Removed the `...Rendering_callback_url` references - Removed the `GRAFANA_NETWORK` variables, as the network name can't be a variable. Instructions: - Fixed a few errors - Added the section for running `docker-compose up -d` to start the containers, and then included creating the influx database instructions utilizing the GUI.
This commit is contained in:
parent
17f9be2cf6
commit
cec13cefd6
|
|
@ -12,14 +12,14 @@ First, create the directories where you want the containers to save everything.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo mkdir -p /volume[#]/[Shared Directory]/unifi-poller/grafana
|
sudo mkdir -p /volume[#]/[Shared Directory]/unifi-poller/grafana
|
||||||
sudo mkdir -p /volume[#]/[Shared Directory/unifi-poller/influxdbx
|
sudo mkdir -p /volume[#]/[Shared Directory]/unifi-poller/influxdbx
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `/volume[#]` is the volume number corresponding to your volumes in Synology;
|
Where `/volume[#]` is the volume number corresponding to your volumes in Synology;
|
||||||
`[Shared Directory]` is the shared directory from above, and then
|
`[Shared Directory]` is the shared directory from above, and then
|
||||||
create the `grafana and influxdb` directories.
|
creating the `grafana and influxdb` directories.
|
||||||
|
|
||||||
You still have to [do this prep work](https://github.com/unifi-poller/unifi-poller/wiki/Synology-HOWTO#method-2) creating the `unifi-poller` user, which I'll re-iterate here:
|
You still have to [do this prep work](https://github.com/unifi-poller/unifi-poller/wiki/Synology-HOWTO#method-2), creating the `unifi-poller` user, which I'll re-iterate here:
|
||||||
|
|
||||||
#. Create a new user account on the Synology from the Control Panel:
|
#. Create a new user account on the Synology from the Control Panel:
|
||||||
- Name the user `unifi-poller`
|
- Name the user `unifi-poller`
|
||||||
|
|
@ -33,9 +33,36 @@ You still have to [do this prep work](https://github.com/unifi-poller/unifi-poll
|
||||||
- `sudo id unifi-poller`
|
- `sudo id unifi-poller`
|
||||||
- `GRAFANA_LOCAL_USERID=1026`
|
- `GRAFANA_LOCAL_USERID=1026`
|
||||||
|
|
||||||
##Variables
|
## Spin Up the Containers
|
||||||
|
|
||||||
For all of the variables used in the docker-compose file, make sure to not only read over but make important edits to the `docker-compose.example.env file. As well as making a copy and naming it `.env`
|
At this point, you are able to run `sudo docker-compose up -d` from within the directory that you have the `docker-compose.yml` file and the `.env` file saved on your Synology.
|
||||||
|
|
||||||
|
And now we have to create the Influx Database.
|
||||||
|
|
||||||
|
## Create Influx Database
|
||||||
|
|
||||||
|
#. Click `Containers` and then double click the running `influxdb1` container
|
||||||
|
#. Switch to the `terminal` tab
|
||||||
|
#. Click the drop down next to `Create` and select `launch with command`
|
||||||
|
#. Enter `bash` and click `ok`
|
||||||
|
#. Select `bash` from the left hand side. You should now see an active `command prompt`
|
||||||
|
#. In the command prompt, enter these commands: (note: pasting IS possible! You have to right click in the terminal window and select `paste`)
|
||||||
|
|
||||||
|
`influx`
|
||||||
|
After a couple of seconds you should be in the InfluxDB shell.
|
||||||
|
Run the following commands in the InfluxDB shell, then close the window:
|
||||||
|
|
||||||
|
```
|
||||||
|
CREATE DATABASE unifi
|
||||||
|
USE unifi
|
||||||
|
CREATE USER unifipoller WITH PASSWORD 'unifipoller' WITH ALL PRIVILEGES
|
||||||
|
GRANT ALL ON unifi TO unifipoller
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
For all of the variables used in the docker-compose file, you'll find them in the `docker-compose.example.env` file. Please, `cp docker-compose.example.env .env` and open it in your favorite text editor. `nano .env`
|
||||||
|
|
||||||
For the `/local/storage/location/` lines, change those to match your directories.
|
For the `/local/storage/location/` lines, change those to match your directories.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,8 @@ INFLUXDB_LOCAL_VOLUME=/local/storage/location/influxdb
|
||||||
#grafana
|
#grafana
|
||||||
GRAFANA_USERNAME=grafana_username
|
GRAFANA_USERNAME=grafana_username
|
||||||
GRAFANA_PASSWORD=changeme
|
GRAFANA_PASSWORD=changeme
|
||||||
GRAFANA_NETWORK=Grafana_Net
|
|
||||||
GRAFANA_LOCAL_VOLUME=/local/storage/location/grafana
|
GRAFANA_LOCAL_VOLUME=/local/storage/location/grafana
|
||||||
GRAFANA_LOCAL_USERID=1026
|
GRAFANA_LOCAL_USERID=1026
|
||||||
GRAFANA_SERVER_DOMAIN=boards.url.com
|
|
||||||
GRAFANA_RENDERING_CALLBACK_URL=boards.url.com
|
|
||||||
GRAFANA_RENDERING_SERVER_URL=boards.url.com
|
|
||||||
|
|
||||||
#unifi-poller
|
#unifi-poller
|
||||||
POLLER_TAG=latest
|
POLLER_TAG=latest
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
# This is for unifi-poller v2.
|
# This is for unifi-poller v2.
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
influxdb:
|
influxdb:
|
||||||
restart: always
|
restart: always
|
||||||
image: influxdb:latest
|
image: influxdb:latest
|
||||||
|
|
@ -11,7 +12,8 @@ services:
|
||||||
- INFLUXDB_DATA_WAL_DIR=/var/lib/influxdb/wal
|
- INFLUXDB_DATA_WAL_DIR=/var/lib/influxdb/wal
|
||||||
- INFLUXDB_DATA_META_DIR=/var/lib/influxdb/meta
|
- INFLUXDB_DATA_META_DIR=/var/lib/influxdb/meta
|
||||||
networks:
|
networks:
|
||||||
- ${GRAFANA_NETWORK}
|
- Grafana_Network
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -28,10 +30,9 @@ services:
|
||||||
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
|
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
|
||||||
- GF_SERVER_DOMAIN=${GRAFANA_SERVER_DOMAIN}
|
- GF_SERVER_DOMAIN=${GRAFANA_SERVER_DOMAIN}
|
||||||
- GF_ENFORCE_DOMAIN=true
|
- GF_ENFORCE_DOMAIN=true
|
||||||
- GF_RENDERING_CALLBACK_URL=${GRAFANA_RENDERING_CALLBACK_URL}
|
|
||||||
- GF_RENDERING_SERVER_URL=${GRAFANA_RENDERING_SERVER_URL}
|
|
||||||
networks:
|
networks:
|
||||||
- ${GRAFANA_NETWORK}
|
- Grafana_Network
|
||||||
|
|
||||||
unifi-poller:
|
unifi-poller:
|
||||||
restart: always
|
restart: always
|
||||||
image: golift/unifi-poller:latest
|
image: golift/unifi-poller:latest
|
||||||
|
|
@ -45,6 +46,7 @@ services:
|
||||||
- UP_POLLER_DEBUG=${POLLER_DEBUG}
|
- UP_POLLER_DEBUG=${POLLER_DEBUG}
|
||||||
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
|
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
|
||||||
networks:
|
networks:
|
||||||
- ${GRAFANA_NETWORK}
|
- Grafana_Network
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
${GRAFANA_NETWORK}:
|
Grafana_Network:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue