[DOC] fix grammar in INSTALL.md and config_example.toml (#86)

This commit is contained in:
Ruben Barkow 2017-10-31 14:34:01 +01:00 committed by Geno
parent d0989cf018
commit c3d486e584
2 changed files with 67 additions and 48 deletions

View File

@ -9,14 +9,14 @@ tar xvf go1.8.linux-amd64.tar.gz
rm go1.8.linux-amd64.tar.gz
```
### Configurate
put this lines into a shell place at root:
### Configure go
Add these lines in your root shell startup file (i.e. `/root/.bashrc`):
```sh
export GOPATH=/opt/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
```
put this lines also into a shell place to use go by normal user:
and these in the shell startup file of a normal user:
```sh
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
@ -25,32 +25,41 @@ export PATH=$PATH:$GOPATH/bin
## Yanic
### Compile
As root:
```sh
go get -v -u github.com/FreifunkBremen/yanic
```
#### Work with other databases
If you did like a other database solution like influxdb,
you are welcome to create another subpackage from database in your fork like the logging.
If you like to use another database solution than influxdb, Pull Requests are
welcome. Just fork this project and create another subpackage within the folder
`database/`. Take this folder as example: `database/logging/`.
### Configurate
### Configure Yanic
```sh
cp /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.conf
```
You only need to edit `/etc/yanic.conf` under section `[respondd]` the `interface` for a easy startup.
And create the following folders:
For an easy startup you only need to edit the `interfaces` in section
`[respondd]` in file `/etc/yanic.conf`.
Then create the following folders:
```sh
mkdir -p /var/lib/yanic
mkdir -p /var/www/html/meshviewer/data
```
#### Standalone
If you like to run a meshviewer standalone, just set `enable` under section `[webserver]` to `true`.
Configurate the [meshviewer](https://github.com/ffrgb/meshviewer) set `dataPath` in `config.json` to `/data/` and put the `build` directory under `/var/www/html/meshviewer`.
If you like to run a standalone meshviewer, just set `enable` in section
`[webserver]` to `true`.
##### Configure the [meshviewer](https://github.com/ffrgb/meshviewer):
set `dataPath` in `config.json` to `/data/` and make the `build` directory
accessible under `/var/www/html/meshviewer`.
#### With webserver (Apache, nginx)
Change following path under section `[nodes]` to what you need.
For `nodes_path` and `graph_path` should be under the same folder for a meshviewer.
The meshviewer needs the output files like `nodes_path` and `graph_path` inside
the same directory as the `dataPath`. Change the path in the section
`[meshviewer]` accordingly.
### Service
```bash

View File

@ -3,12 +3,12 @@
enable = true
# Delay startup until a multiple of the period since zero time
synchronize = "1m"
# how oftern request per multicast
# how often request per multicast
collect_interval = "1m"
# on which interface
interfaces = ["eth0"]
# define a port to listen
# (no or 0 would choose at port at his own)
# if not set or set to 0 the kernel will use a random free port at its own
#port = 10001
@ -20,66 +20,76 @@ bind = "127.0.0.1:8080"
webroot = "/var/www/html/meshviewer"
[nodes]
enable = true
# state-version of nodes.json to store cached data,
# these is the directly collected respondd data
state_path = "/var/lib/yanic/state.json"
enable = true
# Cache file
# a json file to cache all data collected directly from respondd
state_path = "/var/lib/yanic/state.json"
# prune data in RAM, cache-file and output json files (i.e. nodes.json)
# that were inactive for longer than
prune_after = "7d"
# Export nodes and graph periodically
save_interval = "5s"
# Set node to offline if not seen within this period
offline_after = "10m"
# Prune offline nodes after a time of inactivity
prune_after = "7d"
[meshviewer]
# structur of nodes.json, which to support
# version 1 is to support legacy meshviewer (which are in master branch)
# i.e. https://github.com/ffnord/meshviewer/tree/master
# version 2 is to support new version of meshviewer (which are in legacy develop branch or newer)
# i.e. https://github.com/ffnord/meshviewer/tree/dev
# https://github.com/ffrgb/meshviewer/tree/develop
version = 2
# The structure version of the output which should be generated (i.e. nodes.json)
# version 1 is accepted by the legacy meshviewer (which is the master branch)
# i.e. https://github.com/ffnord/meshviewer/tree/master
# version 2 is accepted by the new versions of meshviewer (which are in legacy develop branch or newer)
# i.e. https://github.com/ffnord/meshviewer/tree/dev
# https://github.com/ffrgb/meshviewer/tree/develop
version = 2
# path where to store nodes.json
nodes_path = "/var/www/html/meshviewer/data/nodes.json"
nodes_path = "/var/www/html/meshviewer/data/nodes.json"
# path where to store graph.json
graph_path = "/var/www/html/meshviewer/data/graph.json"
graph_path = "/var/www/html/meshviewer/data/graph.json"
[database]
# cleaning data of measurement node,
# which are older than 7d
delete_after = "7d"
# how often run the cleaning
# this will send delete commands to the database to prune data
# which is older than:
delete_after = "7d"
# how often run the cleaning
delete_interval = "1h"
# Save collected data to InfluxDB
# there would be the following measurments:
# node: store node spezific data i.e. clients memory, airtime
# global: store global data, i.e. count of clients and nodes
# firmware: store count of nodes tagged with firmware
# model: store count of nodes tagged with hardware model
# Save collected data to InfluxDB.
# There are the following measurments:
# node: store node specific data i.e. clients memory, airtime
# global: store global data, i.e. count of clients and nodes
# firmware: store the count of nodes tagged with firmware
# model: store the count of nodes tagged with hardware model
[[database.connection.influxdb]]
enable = false
address = "http://localhost:8086"
database = "ffhb"
username = ""
password = ""
# tagging of the data are optional
# be carefull tags by system would overright config
[database.connection.influxdb.tags]
site = "ffhb01"
system = "testing"
# Tagging of the data (optional)
[database.connection.influxdb.tags]
# Tags used by Yanic would override the tags from this config
# nodeid, hostname, owner, model and firmware are tags which are already used
#tagname1 = "tagvalue 1"
# some usefull e.g.:
#system = "productive"
#site = "ffhb"
# Logging
[[database.connection.logging]]
enable = false
path = "/var/log/yanic.log"
# Graphite settings
[[database.connection.graphite]]
enable = false
address = "localhost:2003"
# Graphite is replacing every "." in the metric name with a slash "/" and uses
# that for the file system hierarchy it generates. it is recommended to at least
# move the metrics out of the root namespace (that would be the empty prefix).
# If you only intend to run one community and only freifunk on your graphite node
# then the prefix can be set to anything (including the empty string) since you
# probably wont care much about "polluting" the namespace.
prefix = "freifunk"