· 7 years ago · Sep 16, 2018, 02:00 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]
63
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# Set to false, if you want the json files to contain the owner information
84#no_owner = false
85#
86# List of nodeids of nodes that should be filtered out, so they won't appear in output
87#blacklist = ["00112233445566", "1337f0badead"]
88#
89# List of site_codes of nodes that should be included in the output
90#sites = ["ffhb"]
91#
92# replace the site_code with the domain_code in this output
93# e.g. site_code='ffhb',domain_code='city' => site_code='city', domain_code=''
94#domain_as_site = true
95#
96# append on the site_code the domain_code with a '.' in this output
97# e.g. site_code='ffhb',domain_code='city' => site_code='ffhb.city', domain_code=''
98#domain_append_site = true
99#
100
101# set has_location to true if you want to include only nodes that have geo-coordinates set
102# (setting this to false has no sensible effect, unless you'd want to hide nodes that have coordinates)
103#has_location = true
104
105#[nodes.output.example.filter.in_area]
106# nodes outside this area are not shown on the map but are still listed as a node without coordinates
107#latitude_min = 34.30
108#latitude_max = 71.85
109#longitude_min = -24.96
110#longitude_max = 39.72
111
112
113# definition for the new more compressed meshviewer.json
114[[nodes.output.meshviewer-ffrgb]]
115enable = true
116path = "/var/www/meshviewer/data/meshviewer.json"
117
118[nodes.output.meshviewer-ffrgb.filter]
119no_owner = false
120#blacklist = ["00112233445566", "1337f0badead"]
121#sites = ["ffhb"]
122#has_location = true
123
124#[nodes.output.meshviewer-ffrgb.filter.in_area]
125#latitude_min = 34.30
126#latitude_max = 71.85
127#longitude_min = -24.96
128#longitude_max = 39.72
129
130
131# definition for nodes.json
132[[nodes.output.meshviewer]]
133enable = true
134# The structure version of the output which should be generated (i.e. nodes.json)
135# version 1 is accepted by the legacy meshviewer (which is the master branch)
136# i.e. https://github.com/ffnord/meshviewer/tree/master
137# version 2 is accepted by the new versions of meshviewer (which are in the legacy develop branch or newer)
138# i.e. https://github.com/ffnord/meshviewer/tree/dev
139# https://github.com/ffrgb/meshviewer/tree/develop
140version = 2
141# path where to store nodes.json
142nodes_path = "/var/www/meshviewer/data/nodes.json"
143# path where to store graph.json
144graph_path = "/var/www/meshviewer/data/graph.json"
145#graph_path = "/dev/null"
146
147[nodes.output.meshviewer.filter]
148no_owner = false
149
150
151# definition for nodelist.json
152[[nodes.output.nodelist]]
153enable = true
154path = "/var/www/meshviewer/data/nodelist.json"
155
156[nodes.output.nodelist.filter]
157no_owner = true
158
159
160
161[database]
162# this will send delete commands to the database to prune data
163# which is older than:
164delete_after = "7d"
165# how often run the cleaning
166delete_interval = "1h"
167
168## [[database.connection.example]]
169# Each database-connection has its own config block and needs to be enabled by adding:
170#enable = true
171
172# Save collected data to InfluxDB.
173# There are the following measurments:
174# node: store node specific data i.e. clients memory, airtime
175# global: store global data, i.e. count of clients and nodes
176# firmware: store the count of nodes tagged with firmware
177# model: store the count of nodes tagged with hardware model
178[[database.connection.influxdb]]
179enable = false
180address = "http://localhost:8086"
181database = "ffhb"
182username = ""
183password = ""
184
185# Tagging of the data (optional)
186[database.connection.influxdb.tags]
187# Tags used by Yanic would override the tags from this config
188# nodeid, hostname, owner, model and firmware are tags which are already used
189#tagname1 = "tagvalue 1"
190# some usefull e.g.:
191#system = "productive"
192#site = "ffhb"
193
194# Graphite settings
195[[database.connection.graphite]]
196enable = false
197address = "localhost:2003"
198# Graphite is replacing every "." in the metric name with a slash "/" and uses
199# that for the file system hierarchy it generates. it is recommended to at least
200# move the metrics out of the root namespace (that would be the empty prefix).
201# If you only intend to run one community and only freifunk on your graphite node
202# then the prefix can be set to anything (including the empty string) since you
203# probably wont care much about "polluting" the namespace.
204prefix = "freifunk"
205
206# respondd (yanic)
207# forward collected respondd package to a address
208# (e.g. to another respondd collector like a central yanic instance or hopglass)
209#[[database.connection.respondd]]
210#enable = false
211# type of network to create a connection
212#type = "udp6"
213# destination address to connect/send respondd package
214#address = "stats.bremen.freifunk.net:11001"
215
216# Logging
217#[[database.connection.logging]]
218#enable = false
219#path = "/var/log/yanic.log"