· 8 years ago · Jul 10, 2018, 05:10 PM
1# This is the config file for Yanic written in "Tom's Obvious, Minimal Language."
2# syntax: https://github.com/toml-lang/toml
3# (if you need somethink multiple times, checkout out the [[array of table]] section)
4
5# Send respondd request to update information
6[respondd]
7enable = true
8# Delay startup until a multiple of the period since zero time
9synchronize = "1m"
10# how often request per multicast
11collect_interval = "1m"
12
13# table of a site to save stats for (not exists for global only)
14#[respondd.sites.example]
15## list of domains on this site to save stats for (empty for global only)
16#domains = []
17## example
18#[respondd.sites.ffhb]
19#domains = ["city"]
20
21# interface that has an IP in your mesh network
22[[respondd.interfaces]]
23ifname = "br-fftr"
24
25[[respondd.interfaces]]
26ifname = "br-fftr_01"
27
28[[respondd.interfaces]]
29ifname = "br-fftr_02"
30
31[[respondd.interfaces]]
32ifname = "br-fftr_03"
33
34[[respondd.interfaces]]
35ifname = "br-fftr_04"
36
37[[respondd.interfaces]]
38ifname = "br-fftr_05"
39
40# ip address which is used for sending
41# (optional - without definition used a address of ifname)
42#ip_address = "fd2f:5119:f2d::5"
43# disable sending multicast respondd request
44# (for receiving only respondd packages e.g. database respondd)
45#send_no_request = false
46# multicast address to destination of respondd
47# (optional - without definition used batman default ff02::2:1001)
48#multicast_address = "ff05::2:1001"
49
50# define a port to listen
51# if not set or set to 0 the kernel will use a random free port at its own
52#port = 10001
53
54# A little build-in webserver, which statically serves a directory.
55# This is useful for testing purposes or for a little standalone installation.
56[webserver]
57enable = false
58bind = "127.0.0.1:8080"
59webroot = "/var/www/meshviewer"
60
61
62[nodes]
63enable = true
64# Cache file
65# a json file to cache all data collected directly from respondd
66state_path = "/var/lib/yanic/state.json"
67# prune data in RAM, cache-file and output json files (i.e. nodes.json)
68# that were inactive for longer than
69prune_after = "7d"
70# Export nodes and graph periodically
71save_interval = "5s"
72# Set node to offline if not seen within this period
73offline_after = "10m"
74
75
76## [[nodes.output.example]]
77# Each output format has its own config block and needs to be enabled by adding:
78#enable = true
79#
80# For each output format there can be set different filters
81#[nodes.output.example.filter]
82#
83
84# Set to false, if you want the json files to contain the owner information
85#no_owner = false
86#
87# List of nodeids of nodes that should be filtered out, so they won't appear in output
88#blacklist = ["00112233445566", "1337f0badead"]
89#
90# List of site_codes of nodes that should be included in the output
91#sites = ["ffhb"]
92#
93# replace the site_code with the domain_code in this output
94# e.g. site_code='ffhb',domain_code='city' => site_code='city', domain_code=''
95#domain_as_site = true
96#
97# append on the site_code the domain_code with a '.' in this output
98# e.g. site_code='ffhb',domain_code='city' => site_code='ffhb.city', domain_code=''
99#domain_append_site = true
100#
101
102# set has_location to true if you want to include only nodes that have geo-coordinates set
103# (setting this to false has no sensible effect, unless you'd want to hide nodes that have coordinates)
104#has_location = true
105
106#[nodes.output.example.filter.in_area]
107# nodes outside this area are not shown on the map but are still listed as a node without coordinates
108#latitude_min = 34.30
109#latitude_max = 71.85
110#longitude_min = -24.96
111#longitude_max = 39.72
112
113
114# definition for the new more compressed meshviewer.json
115[[nodes.output.meshviewer-ffrgb]]
116enable = true
117path = "/var/www/meshviewer/data/meshviewer.json"
118
119[nodes.output.meshviewer-ffrgb.filter]
120no_owner = false
121#blacklist = ["00112233445566", "1337f0badead"]
122#sites = ["ffhb"]
123#has_location = true
124
125#[nodes.output.meshviewer-ffrgb.filter.in_area]
126#latitude_min = 34.30
127#latitude_max = 71.85
128#longitude_min = -24.96
129#longitude_max = 39.72
130
131
132# definition for nodes.json
133[[nodes.output.meshviewer]]
134enable = true
135# The structure version of the output which should be generated (i.e. nodes.json)
136# version 1 is accepted by the legacy meshviewer (which is the master branch)
137# i.e. https://github.com/ffnord/meshviewer/tree/master
138# version 2 is accepted by the new versions of meshviewer (which are in the legacy develop branch or newer)
139# i.e. https://github.com/ffnord/meshviewer/tree/dev
140# https://github.com/ffrgb/meshviewer/tree/develop
141version = 2
142# path where to store nodes.json
143nodes_path = "/var/www/meshviewer/data/nodes.json"
144# path where to store graph.json
145graph_path = "/var/www/meshviewer/data/graph.json"
146#graph_path = "/dev/null"
147
148[nodes.output.meshviewer.filter]
149
150no_owner = false
151
152
153# definition for nodelist.json
154[[nodes.output.nodelist]]
155enable = true
156path = "/var/www/meshviewer/data/nodelist.json"
157
158[nodes.output.nodelist.filter]
159no_owner = true
160
161
162
163
164
165[database]
166# this will send delete commands to the database to prune data
167# which is older than:
168delete_after = "7d"
169# how often run the cleaning
170delete_interval = "1h"
171
172## [[database.connection.example]]
173# Each database-connection has its own config block and needs to be enabled by adding:
174#enable = true
175
176# Save collected data to InfluxDB.
177# There are the following measurments:
178# node: store node specific data i.e. clients memory, airtime
179# global: store global data, i.e. count of clients and nodes
180# firmware: store the count of nodes tagged with firmware
181# model: store the count of nodes tagged with hardware model
182[[database.connection.influxdb]]
183enable = false
184address = "http://localhost:8086"
185database = "ffhb"
186username = ""
187password = ""
188
189# Tagging of the data (optional)
190[database.connection.influxdb.tags]
191# Tags used by Yanic would override the tags from this config
192# nodeid, hostname, owner, model and firmware are tags which are already used
193#tagname1 = "tagvalue 1"
194# some usefull e.g.:
195#system = "productive"
196#site = "ffhb"
197
198# Graphite settings
199[[database.connection.graphite]]
200enable = false
201address = "localhost:2003"
202# Graphite is replacing every "." in the metric name with a slash "/" and uses
203# that for the file system hierarchy it generates. it is recommended to at least
204# move the metrics out of the root namespace (that would be the empty prefix).
205# If you only intend to run one community and only freifunk on your graphite node
206# then the prefix can be set to anything (including the empty string) since you
207# probably wont care much about "polluting" the namespace.
208prefix = "freifunk"
209
210# respondd (yanic)
211# forward collected respondd package to a address
212# (e.g. to another respondd collector like a central yanic instance or hopglass)
213#[[database.connection.respondd]]
214#enable = false
215# type of network to create a connection
216#type = "udp6"
217# destination address to connect/send respondd package
218#address = "stats.bremen.freifunk.net:11001"
219
220# Logging
221#[[database.connection.logging]]
222#enable = false
223#path = "/var/log/yanic.log"