ffdo / node-informant

Small utility to collect node information in a Freifunk network via announced
7 stars 4 forks source link

client count stays "up" for offline nodes #25

Open Adorfer opened 8 years ago

Adorfer commented 8 years ago

A node signing off, will be kept in the metrics file with a line like meshnode_clients{hostname="x",nodeid="y",sitecode="z"} 11 even it's offline for ever.

in plus, if a nodes is renamed, the old one will kept with clients for at least a long, long time: (weeks?)

same file: meshnode_clients{hostname="camp_benrath27",nodeid="30b5c281075e",sitecode="ffdus"} 3 meshnode_clients{hostname="camp-benrode-mystery-075e",nodeid="30b5c281075e",sitecode="ffdus"} 4

Since i tried to sum up all clients from "meshnode_clients", i get totally bogous readings.

Adorfer commented 8 years ago

there is a hack to avoid counting phantoms too, but put's load to the db, similar to the other workaround: Look back in the database for the timestamp of "meshnode_uptime" where the value increased the last time. If distance to current time above arbitrary threshold (e.g. 1h) consider node as offline and do not coult the values.