[DOC] fix grammar in INSTALL.md and config_example.toml (#86)
This commit is contained in:
parent
d0989cf018
commit
c3d486e584
33
INSTALL.md
33
INSTALL.md
@ -9,14 +9,14 @@ tar xvf go1.8.linux-amd64.tar.gz
|
|||||||
rm go1.8.linux-amd64.tar.gz
|
rm go1.8.linux-amd64.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configurate
|
### Configure go
|
||||||
put this lines into a shell place at root:
|
Add these lines in your root shell startup file (i.e. `/root/.bashrc`):
|
||||||
```sh
|
```sh
|
||||||
export GOPATH=/opt/go
|
export GOPATH=/opt/go
|
||||||
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
|
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
|
```sh
|
||||||
export GOPATH=~/go
|
export GOPATH=~/go
|
||||||
export PATH=$PATH:$GOPATH/bin
|
export PATH=$PATH:$GOPATH/bin
|
||||||
@ -25,32 +25,41 @@ export PATH=$PATH:$GOPATH/bin
|
|||||||
## Yanic
|
## Yanic
|
||||||
|
|
||||||
### Compile
|
### Compile
|
||||||
|
As root:
|
||||||
```sh
|
```sh
|
||||||
go get -v -u github.com/FreifunkBremen/yanic
|
go get -v -u github.com/FreifunkBremen/yanic
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Work with other databases
|
#### Work with other databases
|
||||||
If you did like a other database solution like influxdb,
|
If you like to use another database solution than influxdb, Pull Requests are
|
||||||
you are welcome to create another subpackage from database in your fork like the logging.
|
welcome. Just fork this project and create another subpackage within the folder
|
||||||
|
`database/`. Take this folder as example: `database/logging/`.
|
||||||
|
|
||||||
### Configurate
|
### Configure Yanic
|
||||||
```sh
|
```sh
|
||||||
cp /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.conf
|
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.
|
For an easy startup you only need to edit the `interfaces` in section
|
||||||
And create the following folders:
|
`[respondd]` in file `/etc/yanic.conf`.
|
||||||
|
|
||||||
|
Then create the following folders:
|
||||||
```sh
|
```sh
|
||||||
mkdir -p /var/lib/yanic
|
mkdir -p /var/lib/yanic
|
||||||
mkdir -p /var/www/html/meshviewer/data
|
mkdir -p /var/www/html/meshviewer/data
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Standalone
|
#### Standalone
|
||||||
If you like to run a meshviewer standalone, just set `enable` under section `[webserver]` to `true`.
|
If you like to run a standalone meshviewer, just set `enable` in section
|
||||||
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`.
|
`[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)
|
#### With webserver (Apache, nginx)
|
||||||
Change following path under section `[nodes]` to what you need.
|
The meshviewer needs the output files like `nodes_path` and `graph_path` inside
|
||||||
For `nodes_path` and `graph_path` should be under the same folder for a meshviewer.
|
the same directory as the `dataPath`. Change the path in the section
|
||||||
|
`[meshviewer]` accordingly.
|
||||||
|
|
||||||
### Service
|
### Service
|
||||||
```bash
|
```bash
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
enable = true
|
enable = true
|
||||||
# Delay startup until a multiple of the period since zero time
|
# Delay startup until a multiple of the period since zero time
|
||||||
synchronize = "1m"
|
synchronize = "1m"
|
||||||
# how oftern request per multicast
|
# how often request per multicast
|
||||||
collect_interval = "1m"
|
collect_interval = "1m"
|
||||||
# on which interface
|
# on which interface
|
||||||
interfaces = ["eth0"]
|
interfaces = ["eth0"]
|
||||||
# define a port to listen
|
# 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
|
#port = 10001
|
||||||
|
|
||||||
|
|
||||||
@ -20,66 +20,76 @@ bind = "127.0.0.1:8080"
|
|||||||
webroot = "/var/www/html/meshviewer"
|
webroot = "/var/www/html/meshviewer"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[nodes]
|
[nodes]
|
||||||
enable = true
|
enable = true
|
||||||
# state-version of nodes.json to store cached data,
|
# Cache file
|
||||||
# these is the directly collected respondd data
|
# a json file to cache all data collected directly from respondd
|
||||||
state_path = "/var/lib/yanic/state.json"
|
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
|
# Export nodes and graph periodically
|
||||||
save_interval = "5s"
|
save_interval = "5s"
|
||||||
|
|
||||||
# Set node to offline if not seen within this period
|
# Set node to offline if not seen within this period
|
||||||
offline_after = "10m"
|
offline_after = "10m"
|
||||||
|
|
||||||
# Prune offline nodes after a time of inactivity
|
|
||||||
prune_after = "7d"
|
|
||||||
|
|
||||||
|
|
||||||
[meshviewer]
|
[meshviewer]
|
||||||
# structur of nodes.json, which to support
|
# The structure version of the output which should be generated (i.e. nodes.json)
|
||||||
# version 1 is to support legacy meshviewer (which are in master branch)
|
# version 1 is accepted by the legacy meshviewer (which is the master branch)
|
||||||
# i.e. https://github.com/ffnord/meshviewer/tree/master
|
# 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)
|
# 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
|
# i.e. https://github.com/ffnord/meshviewer/tree/dev
|
||||||
# https://github.com/ffrgb/meshviewer/tree/develop
|
# https://github.com/ffrgb/meshviewer/tree/develop
|
||||||
version = 2
|
version = 2
|
||||||
# path where to store nodes.json
|
# 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
|
# 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]
|
[database]
|
||||||
# cleaning data of measurement node,
|
# this will send delete commands to the database to prune data
|
||||||
# which are older than 7d
|
# which is older than:
|
||||||
delete_after = "7d"
|
delete_after = "7d"
|
||||||
# how often run the cleaning
|
# how often run the cleaning
|
||||||
delete_interval = "1h"
|
delete_interval = "1h"
|
||||||
|
|
||||||
# Save collected data to InfluxDB
|
# Save collected data to InfluxDB.
|
||||||
# there would be the following measurments:
|
# There are the following measurments:
|
||||||
# node: store node spezific data i.e. clients memory, airtime
|
# node: store node specific data i.e. clients memory, airtime
|
||||||
# global: store global data, i.e. count of clients and nodes
|
# global: store global data, i.e. count of clients and nodes
|
||||||
# firmware: store count of nodes tagged with firmware
|
# firmware: store the count of nodes tagged with firmware
|
||||||
# model: store count of nodes tagged with hardware model
|
# model: store the count of nodes tagged with hardware model
|
||||||
[[database.connection.influxdb]]
|
[[database.connection.influxdb]]
|
||||||
enable = false
|
enable = false
|
||||||
address = "http://localhost:8086"
|
address = "http://localhost:8086"
|
||||||
database = "ffhb"
|
database = "ffhb"
|
||||||
username = ""
|
username = ""
|
||||||
password = ""
|
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]]
|
[[database.connection.logging]]
|
||||||
enable = false
|
enable = false
|
||||||
path = "/var/log/yanic.log"
|
path = "/var/log/yanic.log"
|
||||||
|
|
||||||
|
# Graphite settings
|
||||||
[[database.connection.graphite]]
|
[[database.connection.graphite]]
|
||||||
enable = false
|
enable = false
|
||||||
address = "localhost:2003"
|
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"
|
prefix = "freifunk"
|
||||||
|
Loading…
Reference in New Issue
Block a user