Update README and log messgaes
This commit is contained in:
parent
308cca4c1b
commit
4907f9c406
2 changed files with 6 additions and 5 deletions
|
@ -14,12 +14,13 @@ Requirements /w install links: [Grafana](http://docs.grafana.org/installation/),
|
||||||
## Quick Setup (Varken Alpha)
|
## Quick Setup (Varken Alpha)
|
||||||
1. Clone the repository `sudo git clone https://github.com/Boerderij/Varken.git /opt/Varken`
|
1. Clone the repository `sudo git clone https://github.com/Boerderij/Varken.git /opt/Varken`
|
||||||
1. Follow the systemd install instructions located in `varken.systemd`
|
1. Follow the systemd install instructions located in `varken.systemd`
|
||||||
1. Create venv in project `/usr/bin/python3 -m venv varken-venv`
|
1. Create venv in project `cd /opt/Varken && /usr/bin/python3 -m venv varken-venv`
|
||||||
1. Install requirements `/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt`
|
1. Install requirements `/opt/Varken/varken-venv/bin/python -m pip install -r requirements.txt`
|
||||||
1. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder
|
1. Make a copy of `varken.example.ini` to `varken.ini` in the `data` folder
|
||||||
`cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini`
|
`cp /opt/Varken/data/varken.example.ini /opt/Varken/data/varken.ini`
|
||||||
1. Make the appropriate changes to `varken.ini`
|
1. Make the appropriate changes to `varken.ini`
|
||||||
ie.`nano /opt/Varken/data/varken.ini`
|
ie.`nano /opt/Varken/data/varken.ini`
|
||||||
|
1. Make sure all the files have the appropriate permissions `sudo chown varken:varken -R /opt/Varken`
|
||||||
1. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb.
|
1. After completing the [getting started](http://docs.grafana.org/guides/getting_started/) portion of grafana, create your datasource for influxdb.
|
||||||
1. Install `grafana-cli plugins install grafana-worldmap-panel`
|
1. Install `grafana-cli plugins install grafana-worldmap-panel`
|
||||||
1. TODO:: Click the + on your menu and click import. Using the .json provided in this repo, paste it in and customize as you like.
|
1. TODO:: Click the + on your menu and click import. Using the .json provided in this repo, paste it in and customize as you like.
|
||||||
|
|
|
@ -36,7 +36,7 @@ class INIParser(object):
|
||||||
t = server_type
|
t = server_type
|
||||||
global_server_ids = self.config.get('global', t)
|
global_server_ids = self.config.get('global', t)
|
||||||
if global_server_ids.lower() in ['false', 'no', '0']:
|
if global_server_ids.lower() in ['false', 'no', '0']:
|
||||||
logger.info('{} disabled.'.format(t.upper()))
|
logger.info('%s disabled.', t.upper())
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
sids = self.clean_check(global_server_ids, t)
|
sids = self.clean_check(global_server_ids, t)
|
||||||
|
@ -54,10 +54,10 @@ class INIParser(object):
|
||||||
logger.error("{} is not a valid server id number".format(sid))
|
logger.error("{} is not a valid server id number".format(sid))
|
||||||
|
|
||||||
if valid_sids:
|
if valid_sids:
|
||||||
logger.info('{} : {}'.format(t.upper(), valid_sids))
|
logger.info('%s : %s', t.upper(), valid_sids)
|
||||||
return valid_sids
|
return valid_sids
|
||||||
else:
|
else:
|
||||||
logger.error("No valid {}".format(t.upper()))
|
logger.error('No valid %s', t.upper())
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def read_file(self):
|
def read_file(self):
|
||||||
|
@ -66,7 +66,7 @@ class INIParser(object):
|
||||||
with open(file_path) as config_ini:
|
with open(file_path) as config_ini:
|
||||||
self.config.read_file(config_ini)
|
self.config.read_file(config_ini)
|
||||||
else:
|
else:
|
||||||
exit("You do not have a varken.ini file in {}".format(self.data_folder))
|
exit('Config file missing (varken.ini) in {}'.format(self.data_folder))
|
||||||
|
|
||||||
def parse_opts(self):
|
def parse_opts(self):
|
||||||
self.read_file()
|
self.read_file()
|
||||||
|
|
Loading…
Reference in a new issue