screen-monitor is a tool written in Golang that allows you to serve your server OS and screen stats' through an API.
- You need Golang Version 1.9.7.
$ git clone https://github.com/arsmine/screen-monitor
$ cd screen-monitor
$ make
./screen-monitor --config example.json
interval
: Time interval(10s, 1m etc.) that how frequently you want to collect OS and screen stats.listen
: IP address and port that you want to serve API.activeScreen
: screen names that you want to check.allowedIPs
: IP-addresses that can access your API.
{
"interval": "10s",
"listen": "0.0.0.0:8080",
"activeScreen": ["screen-name"],
"allowedIPs": ["1.12.14.16"]
}
- add
screen-monitor.service
to/etc/systemd/system/screen-monitor.service
(don't forget the fill the <...>) - to send logs to
/var/log/screen-monitor.log
:- add
screen-monitor-log.conf
to/etc/rsyslog.d/screen-monitor-log.conf
(don't forget the fill the <...>)
- add
$ systemctl start screen-monitor.service
- to start service on start-up:
$ systemctl enable screen-monitor.service
--config <config.json>
Package |
---|
go-osstat/memory |
go-osstat/cpu |
go-osstat/uptime |
go-osstat/disk |
go-osstat/network |
go-osstat/loadavg |
gorilla/mux |