Varken/README.md

43 lines
2.1 KiB
Markdown
Raw Normal View History

2018-12-01 21:15:12 -08:00
# Varken
2018-12-01 21:47:59 -08:00
Dutch for PIG. PIG is an Acronym for Plex/InfluxDB/Grafana
2018-12-01 21:15:12 -08:00
2018-12-01 21:47:59 -08:00
Varken is a standalone commmand-line utility that will aggregate date
2018-12-01 21:15:12 -08:00
from the plex ecosystem into influxdb to be displayed in grafana
2018-04-17 09:53:57 -07:00
Requirements /w install links: [Grafana](http://docs.grafana.org/installation/), [Python3](https://www.python.org/downloads/), [InfluxDB](https://docs.influxdata.com/influxdb/v1.5/introduction/installation/)
2018-10-29 17:16:31 -07:00
<center><img width="800" src="https://i.imgur.com/av8e0HP.png"></center>
2018-12-01 21:38:02 -08:00
## Quick Setup (Varken Alpha)
2018-12-02 12:52:55 -08:00
1. Clone the repository `sudo git clone https://github.com/DirtyCajunRice/grafana-scripts.git /opt/Varken`
2. Change ownership to current user `sudo chown $USER -R /opt/Varken/`
2018-12-01 21:38:02 -08:00
1. Switch to the testing branch `cd /opt/Varken && git checkout refactor-project`
2018-12-02 12:52:55 -08:00
1. Create venv in project `/usr/bin/python3 -m venv varken-venv`
1. Install requirements `/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt`
2018-12-01 21:38:02 -08:00
2. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder
2018-12-02 12:52:55 -08:00
`cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini`
2018-12-01 21:38:02 -08:00
3. Make the appropriate changes to `varken.ini`
2018-12-02 12:52:55 -08:00
`nano /opt/Varken/data/varken.ini`
4. Copy the systemd file `sudo cp /opt/Varken/varken.service /etc/systemd/system/`
1. Edit the username of the systemd file `sudo sed -i "s/username/$USER" /etc/systemd/system/varken.service`
2018-12-01 21:47:59 -08:00
5. start the service and enable it `systemctl start varken && systemctl enable varken`
2018-12-01 21:38:02 -08:00
5. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb. At a minimum, you will need the plex database.
6. Install `grafana-cli plugins install grafana-worldmap-panel`
2018-12-01 21:47:59 -08:00
7. TODO:: Click the + on your menu and click import. Using the .json provided in this repo, paste it in and customize as you like.
2018-08-06 10:41:31 -07:00
2018-12-03 12:37:29 -08:00
### Docker
Repo is included in [si0972/grafana-scripts-docker](https://github.com/si0972/grafana-scripts-docker/tree/varken)
<details><summary>Example</summary>
<p>
```
docker create \
--name=grafana-scripts \
-v <path to data>:/Scripts \
-e PGID=<gid> -e PUID=<uid> \
si0972/grafana-scripts:varken
```
</p>
</details>