Node monitoring
Gluon is capable of announcing information about each node to the mesh and to neighbouring nodes. This allows nodes to learn each others hostname, IP addresses, location, software versions and various other information.
Format of collected data
Information to be announced is currently split into three categories:
- nodeinfo
- In this category (mostly) static information is collected. If something is unlikely to change without human intervention it should be put here.
- statistics
- This category holds fast changing data, like traffic counters, uptime, system load or the selected gateway.
- neighbours
- neighbours contains information about all neighbouring nodes of all interfaces. This data can be used to determine the network topology.
All categories will have a node_id
key. It should be used to
relate data of different categories.
Accessing Node Information
There are two packages responsible for distribution of the information. For one, information is distributed across the mesh using alfred. Information between neighbouring nodes is exchanged using gluon-respondd.
alfred (mesh bound)
The package gluon-alfred
is required for this to work.
Using alfred both categories are distributed within the mesh. In order to retrieve the data you'll need both a local alfred daemon and alfred-json installed. Please note that at least one alfred daemon is required to run as master.
The following data types are used:
- nodeinfo: 158
- statistics: 159
- neighbours: 160
All data is compressed using GZip (alfred-json can handle the decompression).
In order to retrieve statistics data you could run:
# alfred-json -z -r 159
{
"f8:d1:11:7e:97:dc": {
"processes": {
"total": 55,
"running": 2
},
"idletime": 30632.290000000001,
"uptime": 33200.07,
"memory": {
"free": 1660,
"cached": 8268,
"total": 29212,
"buffers": 2236
},
"node_id": "f8d1117e97dc",
"loadavg": 0.01
},
"90:f6:52:3e:b9:50": {
"processes": {
"total": 58,
"running": 2
},
"idletime": 28047.470000000001,
"uptime": 33307.849999999999,
"memory": {
"free": 2364,
"cached": 7168,
"total": 29212,
"buffers": 1952
},
"node_id": "90f6523eb950",
"loadavg": 0.34000000000000002
}
}
You can find more information about alfred in its README.