Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.1 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.1 KB

SERVER-STATUS-CLIENT

To send metrics to the API every 5 minutes (on a system with cron utility installed), add this line to your cron table $crontab -e:

*/5 * * * * /home/your-user/server-status-client/bin/server-status-client api:send-metrics

To enable client listening for API Live Metrics Request (on a system with systemd utility installed), you can create a systemd Unit file at /etc/systemd/system/server-status-client.service with this content:

[Unit]
Description=Server Status Client (Live Mode)

[Service]
Type=simple
Restart=always
ExecStart=/home/your-user/server-status-client/bin/server-status-client api:list

[Install]
WantedBy=multi-user.target

Reload systemd daemon:

$systemctl daemon-reload

Then start the service manually with the command:

$systemctl start server-status-client

To stop the service:

$systemctl stop server-status-client

Or enable on-boot loading of the service:

$systemctl enable server-status-client

To disable on-boot loading:

$systemctl disable server-status-client