Author: Ashley Cawley // @ashleycawley
This script is designed to get the client computer (Raspberry Pi) to publish its status to a central (web) server, with the idea of multiple different systems all publishing their status to that central server so that the Administrator has one easy place to view the general health and uptime of the systems or IOT devices.
An example of some of data the client system would publish would be:
- Hostname
- Uptime
- Load
- Logged on Users
- LAN IP Address
- WAN IP Address
- MAC Address
- CPU Temperature
- GPU temperatures
- Free disk space
Whilst this script will install itself it does require the you to specify some settings in order to configure it properly, this is explained in more detail below.
The Bash script contains a self-installer, it checks to see if it is already present in /usr/local/bin and if it is not then it copies itself to that location and then schedules a task (via the crontab) to trigger itself on a regular basis (eg. hourly).
So at this point I would probably recommend not following these setup instructions.
For this project to work you will need:
- A Web Hosting service that allows SSH access
- An ability to setup Key-Based Authentication for SSH
- A Raspberry Pi (or other Linux sytem you wish to monitor)
- Ability to edit a script to change some easy settings (variables)
wget https://raw.githubusercontent.com/ashleycawley/raspberry-pi-status/master/update-status.sh
REMOTESERVER="status.YourWebServer.co.uk" - Hostname of your Remote Web Server USERNAME=pistatus Username on your Remote Server