Skip to content

Commit

Permalink
Update README and log messgaes
Browse files Browse the repository at this point in the history
  • Loading branch information
samwiseg0 committed Dec 5, 2018
1 parent 9983b67 commit 7a74487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ Requirements /w install links: [Grafana](http://docs.grafana.org/installation/),
## Quick Setup (Varken Alpha)
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. 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. 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`
1. Make the appropriate changes to `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. 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.
Expand Down
8 changes: 4 additions & 4 deletions varken/iniparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def enable_check(self, server_type=None):
t = server_type
global_server_ids = self.config.get('global', t)
if global_server_ids.lower() in ['false', 'no', '0']:
logger.info('{} disabled.'.format(t.upper()))
logger.info('%s disabled.', t.upper())
return False
else:
sids = self.clean_check(global_server_ids, t)
Expand All @@ -54,10 +54,10 @@ def clean_check(self, server_id_list, server_type=None):
logger.error("{} is not a valid server id number".format(sid))

if valid_sids:
logger.info('{} : {}'.format(t.upper(), valid_sids))
logger.info('%s : %s', t.upper(), valid_sids)
return valid_sids
else:
logger.error("No valid {}".format(t.upper()))
logger.error('No valid %s', t.upper())
return False

def read_file(self):
Expand All @@ -66,7 +66,7 @@ def read_file(self):
with open(file_path) as config_ini:
self.config.read_file(config_ini)
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):
self.read_file()
Expand Down

0 comments on commit 7a74487

Please sign in to comment.