README: Update to new nodes.json version
parent
3b8308722f
commit
abc84e9fc9
35
README.md
35
README.md
|
@ -55,23 +55,24 @@ will prefix `sudo` where necessary.
|
||||||
|
|
||||||
## nodes.json
|
## nodes.json
|
||||||
|
|
||||||
{ 'nodes': {
|
{ "nodes": [
|
||||||
node_id: { 'flags': { flags },
|
{ "flags": { flags },
|
||||||
'firstseen': isoformat,
|
"firstseen": isoformat,
|
||||||
'lastseen': isoformat,
|
"lastseen": isoformat,
|
||||||
'nodeinfo': {...}, # copied from alfred type 158
|
"nodeinfo": {...}, # copied from node's nodeinfo announcement
|
||||||
'statistics': {
|
"statistics": {
|
||||||
'uptime': double, # seconds
|
"uptime": double, # seconds
|
||||||
'memory_usage': double, # 0..1
|
"memory_usage": double, # 0..1
|
||||||
'clients': double,
|
"clients": double,
|
||||||
'rootfs_usage': double, # 0..1
|
"rootfs_usage": double, # 0..1
|
||||||
'loadavg': double,
|
"loadavg": double,
|
||||||
'gateway': mac
|
"gateway": mac
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
]
|
||||||
'timestamp': isoformat
|
"timestamp": isoformat,
|
||||||
|
"version": 2
|
||||||
}
|
}
|
||||||
|
|
||||||
### flags (bool)
|
### flags (bool)
|
||||||
|
@ -108,7 +109,7 @@ database.
|
||||||
After running ffmap-backend, copy `graph.json` to your webserver. Then,
|
After running ffmap-backend, copy `graph.json` to your webserver. Then,
|
||||||
filter `nodes.json` using `jq` like this:
|
filter `nodes.json` using `jq` like this:
|
||||||
|
|
||||||
jq '.nodes = (.nodes | with_entries(del(.value.nodeinfo.owner)))' \
|
jq '.nodes = (.nodes | map(del(.nodeinfo.owner)))' \
|
||||||
< /ffmap-data/nodes.json > /var/www/data/nodes.json
|
< /ffmap-data/nodes.json > /var/www/data/nodes.json
|
||||||
|
|
||||||
This will remove owner information from nodes.json before copying the data
|
This will remove owner information from nodes.json before copying the data
|
||||||
|
|
Loading…
Reference in New Issue