🔮 simple network status monitor
Go to file
sophie e7820e8bf0 plap 2024-03-15 00:33:19 +00:00
lib plap 2024-03-15 00:33:19 +00:00
.gitignore plap 2024-03-15 00:33:19 +00:00
LICENSE Initial commit 2024-02-07 04:10:09 +00:00
README.md plap 2024-03-15 00:33:19 +00:00
conf.json plap 2024-03-15 00:33:19 +00:00
conf.server.json plap 2024-03-15 00:33:19 +00:00
index.js plap 2024-03-15 00:33:19 +00:00
lighthouse.service plap 2024-03-15 00:33:19 +00:00
package.json plap 2024-03-15 00:33:19 +00:00

README.md

lighthouse

simple network status monitor

configuration

conf.json

{
	"server": true,
	"site": "zvava.org",
	"path": "/api/lighthouse",
	"token": "a1b2c3d4etc",
	"this": {
		"name": "zvavnet",
		"checkInterval": 20,
		"reportedServices": [
			"agate",
			"caddy",
			...
		]
	}
}

server

decides if the server should be hosted in addition to collecting its own statistics

site

is the domain of your lighthouse server

path

is the path to the api endpoint on your server's domain

token

verifies clients to a server, should be same on all devices across your network

this.name

name of this device in the network

this.checkInterval

how often to check the status of local services (in seconds)

this.reportedServices

array of the names of systemd services to report status and uptime of

conf.server.json

{
	"apiPort": 8002,
	"fePort": 8003,
	"cacheDB": ".status-cache.json",
	"saveTimeout": 5,
	"handshakeInterval": 90,
	"handshakeTimeout": 240
}

apiPort

port the service is hosted on

fePort

port the frontend is exposed on, set to -1 (≤ 0) to disable the frontend

cacheDB

filename for the cache of monitor statuses

saveTimeout

period to elapse before an update to the network status is saved to disk (in seconds)

handshakeTimeout

time between handshakes before a client is deemed offline (in seconds)

handshakeInterval

time expected between handshakes (in seconds) sent when a device is registered