System monitoring api & administrative panel
Sphere-Guard is a simple monitoring tools available with his proper API.
This tool can be installed easily on most of the UNIX based OS.
Here are some screenshot of the API admin panel:
Here is the page that you can see just after a successful login.
You have access to an overview of all your domain.
You can refresh all the api key here. You can also create new users (futur api client) and manage access to your api's admin panel.
You can add or remove your watched hosts on this panel.
Here you can see which user is a regular user of your api:
This page allow you to update and modify your personal data:
You can follow here the (futur) development of Sphere-Guard
Here are the differents steps:
A MySQL database is required because the GuardUpdater will store its values obtained during it survey. You can easily create this database using the SphereGuard.sql sql script. So just use the phpmyadmin "import" fonction or execute it in a MySQL terminal.
After having imported this database, create a new user and set him grant on the SphereGuard db.
/!\ Don't forget to set these credentials in the GuardUpdater.sh script !
Now you're ready to set up the administration panel. You need to have, obviously, a web server available (Apache, Nginx, or whatever).
I'm not an expert of Nginx but here is the apache configuration for running properly the admin area:
This configuration file stay normal (on linux OS) in /etc/apache2/sites-available/yourConfigFileName
Alias /SphereGuard /path/to/your/SphereGuard/directory/
<Directory /path/to/your/SphereGuard/directory/>
Order Allow,Deny
Allow from all
</Directory>
After this, just open the SphereGuard url in your browser and you normally will see this:
Fill the form and you're done.
You can log in with these credential:
User: Admin
Password: Password
Don't forget to instantly change the default username and password with your personal identifier !!!
You need to install the following linux package on your futur monitored server:
- mpstat
- pvdisplay (if you use some lvm drive)
- sudo
- lm-sensors
- hddtemp
- Mysql-client
This file is a bash script that collect all theses server information
- CPU usage
- Ram usage
- Disk (lvm drive) usage
- CPU temperature
- Disk temperature
For proper operation you need to edit the "config" section.
#!/bin/bash
## Config ###################################
dbHost=127.0.0.1 #Mysql Host name/Ip
dbUser=user #Mysql user
dbPassword=password #Mysql user's pass
dbName=SphereGuard #Mysql database name
hostNumberID=1324 #Unique ID of your watched server
hddToWatch=/dev/sda #temp form this hdd
#############################################You can find your host unique ID in the "Manage hosts" section on your admin panel.
Now you're ready to use the GuardUpdater.sh file. You can place this file where you want on your server and set it in your "crontab" file.
Here is an exemple with an update every 15 min:(/etc/crontab file)
*/15 * * * * root /home/cypress/SphereGuard/GuardUpdater.shYour SphereGuard installation is now finished !
If you have any question, remark or advice please let me know. Send me a mail or create a new issue. Thanks in advance !
You can find here all the syntax and the methods available in the API.





