Skip to content

CypressXt/Sphere-Guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

149 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sphere-Guard

System monitoring api & administrative panel

Readme Index


Description

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.

Admin panel

Here are some screenshot of the API admin panel:

Home view

Here is the page that you can see just after a successful login. You have access to an overview of all your domain. Alt text

Api key and user management view

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. Alt text

Api host management view

You can add or remove your watched hosts on this panel. Alt text

Api statistics view

Here you can see which user is a regular user of your api: Alt text

Personal informations view

This page allow you to update and modify your personal data: Alt text


Upcoming Development

You can follow here the (futur) development of Sphere-Guard

Installation

Here are the differents steps:

MySQL Database

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 !

Web server

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:

Alt text

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 !!!

Server to observe

Package required

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

GuardUpdater.sh

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.sh

Your 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 !


API manipulation

You can find here all the syntax and the methods available in the API.

About

System monitoring api & administrative panel

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors