@@ -14,9 +14,7 @@ Run `backend.py --help` for a quick overview of all available options.
14
14
15
15
For the script's regular execution add the following to the crontab:
16
16
17
- <pre >
18
- * * * * * backend.py -d /path/to/output -a /path/to/aliases.json --vpn ae:7f:58:7d:6c:2a d2:d0:93:63:f7:da
19
- </pre >
17
+ * * * * * backend.py -d /path/to/output -a /path/to/aliases.json --vpn ae:7f:58:7d:6c:2a d2:d0:93:63:f7:da
20
18
21
19
# Dependencies
22
20
@@ -87,12 +85,11 @@ If you want to still use the old [ffmap-d3](https://github.com/ffnord/ffmap-d3)
87
85
front end, you can use the file ` ffmap-d3.jq ` to convert the new output to the
88
86
old one:
89
87
90
- ```
91
- jq -n -f ffmap-d3.jq \
92
- --argfile nodes nodedb/nodes.json \
93
- --argfile graph nodedb/graph.json \
94
- > nodedb/ffmap-d3.json
95
- ```
88
+ jq -n -f ffmap-d3.jq \
89
+ --argfile nodes nodedb/nodes.json \
90
+ --argfile graph nodedb/graph.json \
91
+ > nodedb/ffmap-d3.json
92
+
96
93
97
94
Then point your ffmap-d3 instance to the ` ffmap-d3.json ` file.
98
95
@@ -110,8 +107,8 @@ database.
110
107
After running ffmap-backend, copy ` graph.json ` to your webserver. Then,
111
108
filter ` nodes.json ` using ` jq ` like this:
112
109
113
- jq '.nodes = (.nodes | map(del(.nodeinfo.owner)))' \
114
- < /ffmap-data/nodes.json > /var/www/data/nodes.json
110
+ jq '.nodes = (.nodes | map(del(.nodeinfo.owner)))' \
111
+ < /ffmap-data/nodes.json > /var/www/data/nodes.json
115
112
116
113
This will remove owner information from nodes.json before copying the data
117
114
to your webserver.
@@ -122,7 +119,7 @@ to your webserver.
122
119
# Convert from nodes.json version 1 to version 2
123
120
124
121
jq '.nodes = (.nodes | to_entries | map(.value)) | .version = 2' \
125
- < nodes.json > nodes.json.new
122
+ < nodes.json > nodes.json.new
126
123
mv nodes.json.new nodes.json
127
124
128
125
@@ -131,36 +128,36 @@ to your webserver.
131
128
## Comand line arguments
132
129
Running ` backend.py ` with ` --with-graphite ` will enable graphite support for storing statistical data.
133
130
134
- graphite integration:
135
- --with-graphite Send statistical data to graphite backend
136
- --graphite-host GRAPHITE_HOST
137
- Hostname of the machine running graphite
138
- --graphite-port GRAPHITE_PORT
139
- Port of the carbon daemon
140
- --graphite-prefix GRAPHITE_PREFIX
141
- Storage prefix (default value: 'freifunk.nodes.')
142
- --graphite-metrics GRAPHITE_METRICS
143
- Comma separated list of metrics to store (default
144
- value: 'clients,loadavg,uptime')
131
+ graphite integration:
132
+ --with-graphite Send statistical data to graphite backend
133
+ --graphite-host GRAPHITE_HOST
134
+ Hostname of the machine running graphite
135
+ --graphite-port GRAPHITE_PORT
136
+ Port of the carbon daemon
137
+ --graphite-prefix GRAPHITE_PREFIX
138
+ Storage prefix (default value: 'freifunk.nodes.')
139
+ --graphite-metrics GRAPHITE_METRICS
140
+ Comma separated list of metrics to store (default
141
+ value: 'clients,loadavg,uptime')
145
142
146
143
## Graphite configuration
147
144
148
145
### storage-schemas.conf
149
146
150
- [freifunk_node_stats]
151
- pattern = ^freifunk\.nodes\.
152
- retentions = 60s:1d,5min:7d,1h:30d,1d:4y
153
-
147
+ [freifunk_node_stats]
148
+ pattern = ^freifunk\.nodes\.
149
+ retentions = 60s:1d,5min:7d,1h:30d,1d:4y
150
+
154
151
### storage-aggregation.conf
155
152
156
- [freifunk_node_stats_loadavg]
157
- pattern = ^freifunk\.nodes\..*\.loadavg$
158
- aggregationMethod = avg
153
+ [freifunk_node_stats_loadavg]
154
+ pattern = ^freifunk\.nodes\..*\.loadavg$
155
+ aggregationMethod = avg
159
156
160
- [freifunk_node_stats_clients]
161
- pattern = ^freifunk\.nodes\..*\.clients$
162
- aggregationMethod = max
157
+ [freifunk_node_stats_clients]
158
+ pattern = ^freifunk\.nodes\..*\.clients$
159
+ aggregationMethod = max
163
160
164
- [freifunk_node_stats_uptime]
165
- pattern = ^freifunk\.nodes\..*\.uptime$
166
- aggregationMethod = last
161
+ [freifunk_node_stats_uptime]
162
+ pattern = ^freifunk\.nodes\..*\.uptime$
163
+ aggregationMethod = last
0 commit comments