Skip to content

Commit 304e36f

Browse files
documentation updated
1 parent 0b12481 commit 304e36f

31 files changed

+378
-89
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ System Guard is a Flask app designed to monitor server stats such as CPU, Memory
1919
- Role-based dashboards tailored for Developer, Admin, IT Manager, and Manager roles (upcoming feature).
2020
- Update security updates with a single click or automatically update to the latest version to simplify maintenance.
2121

22+
## Get started 🛠️
23+
24+
- Check the [documentation](https://systemguard.readthedocs.io/en/latest/installation.html) for installation instructions.
25+
2226
## Architecture 🏗️
2327

2428
![SystemGuard-Architecture](/src/docs/images/SystemGuard-Architecture.jpg)
@@ -29,10 +33,6 @@ System Guard is a Flask app designed to monitor server stats such as CPU, Memory
2933
- **Backend**: Python, Flask, SQLAlchemy, SQLite, Prometheus, InfluxDB
3034
- **Monitoring**: psutil, speedtest-cli, nmap, netstat
3135

32-
## Get started 🛠️
33-
34-
- Check the [Installation.md](/src/docs/installation.md) file for installation instructions.
35-
3636
## Release Notes 📝
3737

3838
- Check the [Release Notes](/src/docs/Release.md) file for the latest updates.
@@ -61,8 +61,3 @@ Contributions are always welcome! Please read the [contribution guidelines](/CON
6161
## License 📝
6262

6363
This project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.
64-
65-
66-
<!-- ## Contact 📧
67-
68-
- Please email me at [email protected] to schedule a demo of the commercial version of the app. This version includes the latest features, a centralized control panel, role-based dashboards, support for multiple servers, and more. -->

auto_build_docs.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Set the directories for your Sphinx documentation source and build
4+
SOURCE_DIR="docs"
5+
BUILD_DIR="build"
6+
PORT=5051
7+
8+
# remove the build directory
9+
rm -rf "$BUILD_DIR"
10+
11+
# Check if sphinx-autobuild is installed
12+
if ! command -v sphinx-autobuild &> /dev/null
13+
then
14+
echo "sphinx-autobuild could not be found, installing it now..."
15+
pip install sphinx-autobuild
16+
fi
17+
18+
# Run sphinx-autobuild with the source and build directories
19+
echo "Starting auto-reload for Sphinx documentation..."
20+
sphinx-autobuild "$SOURCE_DIR" "$BUILD_DIR" --open-browser --port "$PORT"

docs/configure_central_server.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
Congiure the Central Server
1+
Configure the Central Server
22
===========================
33

4-
To configure the central server, you have to configure the prometheus to access data/metrics from the
5-
other servers on the node with systemguard installed.
4+
To configure the central server, you need to set up Prometheus to access data and metrics from other servers where SystemGuard is installed.
65

7-
1. Go to ``Systemguard Central`` and click on the ``configure targets for systemguard``.
8-
2. To add new target add the follwing details:
9-
- Job Name: Enter the job name(eg: dev server)
10-
- Target URL: Enter the target url(eg: dev-server-ip:8000)
11-
- Scrap Interval: Enter the scrap interval(eg: 10s)
12-
- Username: Enter the prometheus username of that server(any login of that server will work)
13-
- Password: Enter the prometheus password of that server(any login of that server will work)
14-
3. After adding the target, click on the ``add target`` button to add the target.
15-
4. After this click on ``update prometheus`` to take the changes in effect on prometheus.
16-
5. check on changes on ``prometheus`` or ``dashboard_network``(in systemguard) to see the changes.
6+
Steps to Configure:
177

8+
1. Navigate to **SystemGuard Central** and click on **Configure Targets for SystemGuard**.
189

10+
2. To add a new target, provide the following details:
11+
12+
- **Job Name**: Enter a descriptive job name (e.g., `dev server`).
13+
- **Target URL**: Specify the target URL (e.g., `dev-server-ip:8000`).
14+
- **Scrape Interval**: Set the scrape interval (e.g., `10s`).
15+
- **Username**: Enter the Prometheus username for that server (any valid login will work).
16+
- **Password**: Enter the Prometheus password for that server (any valid login will work).
17+
18+
3. After entering the target details, click on the **Add Target** button to save the target.
19+
20+
4. Next, click on **Update Prometheus** to apply the changes in Prometheus.
21+
22+
5. Verify the changes in **Prometheus** or the **Dashboard Network** (within SystemGuard) to ensure everything is functioning correctly.

docs/configure_email.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Configure Email
22
==============
33

4-
SystemGuard can send email notifications to alert you of system events.
5-
It's uses the SMTP protocol to send emails.
4+
SystemGuard can send email notifications to alert you of system events using the SMTP protocol.
65

7-
To configure email, follow these steps:
6+
To configure email notifications, follow these steps:
7+
8+
1. Click on **SMTP Configurations** under the **Settings** section in the SystemGuard dashboard.
89

9-
1. click on **SMTP configurations** under the **settings** section in the SystemGuard dashboard.
1010
2. Enter the following SMTP details:
11-
- SMTP Server: Enter the SMTP server address.
12-
- SMTP Port: Enter the SMTP port number.
13-
- SMTP Username: Enter the SMTP username.
14-
- SMTP Password: Enter the SMTP password.
15-
- Sender Email: Enter the email address from which the emails will be sent.
1611

12+
- **SMTP Server**: Enter the SMTP server address.
13+
- **SMTP Port**: Enter the SMTP port number.
14+
- **SMTP Username**: Enter the SMTP username.
15+
- **SMTP Password**: Enter the SMTP password.
16+
- **Sender Email**: Enter the email address from which the emails will be sent.

docs/features_toggles.rst

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,64 @@
1-
Features Toggles
2-
================
1+
Toggles
2+
=======
3+
4+
Page Toggles
5+
------------
6+
7+
You can enable/disable page features using the following toggles:
8+
9+
.. list-table::
10+
:widths: 30 70
11+
:header-rows: 1
12+
13+
* - Toggle
14+
- Description
15+
* - Dashboard Network
16+
- Dashboard Network to track the target network.
17+
* - CPU Information
18+
- CPU Information to track the target CPU.
19+
* - Memory Information
20+
- Memory Information to track the target memory.
21+
* - Disk Information
22+
- Disk Information to track the target disk.
23+
* - Network Information
24+
- Network Information to track the target network.
25+
* - Process Information
26+
- Process Information to track the target process.
27+
28+
29+
Card Toggles
30+
------------
31+
32+
you can enable/disable card features using the following toggles:
33+
34+
.. list-table::
35+
:widths: 20 80
36+
:header-rows: 1
37+
38+
* - Toggle
39+
- Description
40+
* - User Card
41+
- Card to show the user information.
42+
* - Server Card
43+
- Card to show the server information.
44+
* - Battery Card
45+
- Card to show the battery information.
46+
* - CPU Core Card
47+
- Card to show the CPU core information.
48+
* - CPU Usage Card
49+
- Card to show the CPU usage information.
50+
* - CPU Temp Card
51+
- Card to show the CPU temperature information.
52+
* - Dashboard Memory Card
53+
- Card to show the SystemGuard memory consumption.
54+
* - Memory Usage Card
55+
- Card to show the memory usage information.
56+
* - Disk Usage Card
57+
- Card to show the disk usage information.
58+
* - System Uptime Card
59+
- Card to show the system uptime information.
60+
* - Network Statistic Card
61+
- Card to show the network statistics information.
62+
* - Speedtest Card
63+
- Card to show the network speed test information.
64+

docs/general_settings.rst

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
11
General Settings
2-
===============
2+
================
3+
4+
The **General Settings** section is the first place you'll encounter when navigating to the settings page in SystemGuard. Here, you can configure key options that define the server’s behavior and performance.
5+
6+
Timezone
7+
~~~~~~~~
8+
9+
The **Timezone** setting allows you to specify the correct timezone for the server. This ensures that logs, events, and metrics are timestamped accurately.
10+
11+
To change the timezone:
12+
13+
1. Select the appropriate timezone from the dropdown menu.
14+
2. Click **Save Changes** to apply the update.
15+
16+
Enable Caching
17+
~~~~~~~~~~~~~~
18+
19+
The **Enable Caching** option allows you to control whether caching is active on the server. Caching can enhance performance by storing frequently accessed data, thus reducing server load.
20+
21+
- **Enabled**: Caching is activated, speeding up responses for repeat requests.
22+
- **Disabled**: Caching is turned off, which may increase server load but ensures the most current data is always served.
23+
24+
Enable Alerts
25+
~~~~~~~~~~~~~
26+
27+
The **Enable Alerts** setting allows you to toggle system alerts. When enabled, SystemGuard will notify you of critical events like high resource usage, system errors, or warnings.
28+
29+
- **Enabled**: Alerts will be sent to the configured email addresses or dashboards.
30+
- **Disabled**: Alerts are disabled, and no notifications will be sent, even for critical issues.
31+
32+
Metrics Logging
33+
~~~~~~~~~~~~~~~
34+
35+
The **Metrics Logging** option controls whether SystemGuard logs detailed system metrics. Enabling this feature allows for the recording of key metrics such as CPU, memory, and network usage for later analysis.
36+
37+
- **Enabled**: Metrics are logged, allowing for detailed performance reviews and historical analysis.
38+
- **Disabled**: Metrics logging is turned off, reducing storage use but limiting insights into system performance.
39+
40+
Log Retention
41+
~~~~~~~~~~~~~
42+
43+
The **Log Retention** setting determines how long logs will be stored before being automatically deleted. Adjust this to match your storage capabilities and compliance needs.
44+
45+
- **Retention Period**: Choose a retention period (e.g., 7 days, 30 days, or indefinitely).
46+
47+
Auto-Update
48+
~~~~~~~~~~~
49+
50+
The **Auto-Update** setting controls whether SystemGuard updates automatically. If enabled, SystemGuard will periodically check for and install updates, ensuring your system stays current with the latest features and security patches.
51+
52+
- **Enabled**: SystemGuard will automatically download and install updates.
53+
- **Disabled**: Updates must be manually installed.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. rst-class:: hide-header
22

33
Welcome to SystemGuard's documentation!
4-
=====================================
4+
=======================================
55

66

77
.. toctree::

docs/installation.rst

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,104 @@
11
SystemGuard Installation Guide
22
==============================
33

4+
5+
Installation
6+
------------
7+
48
Prerequisites
59
~~~~~~~~~~~~~
610

711
Before installing SystemGuard, ensure that the following dependency is
812
installed:
913

10-
- **Anaconda3/Miniconda3**: This is required for the app to run
11-
properly.
14+
**Required Packages**
15+
^^^^^^^^^^^^^^^^^^^^^
1216

13-
To install Miniconda3, run the following commands:
17+
The following packages are required for the SystemGuard app to function
18+
properly:
1419

1520
.. code:: bash
1621
17-
# Install Miniconda3
18-
wget https://raw.githubusercontent.com/codeperfectplus/HackScripts/main/setup/install_miniconda.sh
19-
chmod +x install_miniconda.sh && ./install_miniconda.sh
22+
sudo apt-get update
23+
sudo apt-get install git curl wget unzip iptables jq nmap
24+
25+
.. code:: bash
2026
21-
Install Docker as it is required by the prometheus and grafana services.
27+
sudo dnf update -y
28+
sudo dnf install -y git curl wget unzip iptables jq namp
2229
2330
.. code:: bash
2431
25-
wget https://raw.githubusercontent.com/codeperfectplus/HackScripts/refs/heads/main/setup/setup_docker.sh
26-
chmod +x setup_docker.sh && ./setup_docker.sh
32+
sudo yum update -y
33+
sudo yum install -y git curl wget unzip iptables jq nmap
2734
28-
Installation Steps
29-
~~~~~~~~~~~~~~~~~~
35+
**Anaconda3/Miniconda3**
36+
^^^^^^^^^^^^^^^^^^^^^^^^
3037

31-
1. Install the required dependencies:
38+
This is required for the app to run properly.
39+
40+
To install Miniconda3, run the following commands:
3241

3342
.. code:: bash
3443
35-
# debian based distros
36-
sudo apt-get update
37-
sudo apt-get install git curl wget unzip iptables jq nmap
44+
# Install Miniconda3
45+
wget https://raw.githubusercontent.com/codeperfectplus/HackScripts/main/setup/install_miniconda.sh
46+
chmod +x install_miniconda.sh && ./install_miniconda.sh
47+
48+
**Docker**
49+
^^^^^^^^^^
50+
Docker as it is required by the prometheus and grafana services. Install Docker using the following commands, based on your distro:
3851

3952
.. code:: bash
4053
41-
sudo dnf update -y
42-
sudo dnf install -y git curl wget unzip iptables jq namp
54+
# debian / apt based distros
55+
wget https://raw.githubusercontent.com/codeperfectplus/HackScripts/refs/heads/main/setup/setup_docker.sh
56+
chmod +x setup_docker.sh && ./setup_docker.sh
4357
4458
.. code:: bash
4559
46-
sudo yum update -y
47-
sudo yum install -y git curl wget unzip iptables jq nmap
60+
# centos / yum based distros
61+
wget https://raw.githubusercontent.com/codeperfectplus/HackScripts/refs/heads/main/setup/setup_docker_centos.sh
62+
chmod +x setup_docker_centos.sh && ./setup_docker_centos.sh
4863
49-
- curl: For downloading files from the internet.
50-
- wget: For downloading files from the internet.
51-
- unzip: For extracting zip files.
52-
- iptables: For managing firewall rules.
53-
- jq: For processing JSON data.
54-
- nmap: For network scanning and monitoring.
64+
Installation Steps
65+
^^^^^^^^^^^^^^^^^^
5566

56-
2. Download and set up the SystemGuard installer:
67+
1. Download and set up the SystemGuard installer:
5768

5869
.. code:: bash
5970
6071
wget https://raw.githubusercontent.com/codeperfectplus/SystemGuard/production/setup.sh
6172
chmod +x setup.sh && sudo mv setup.sh /usr/local/bin/systemguard-installer
6273
63-
3. Run the following command to install the SystemGuard app:
74+
2. Run the following command to install the SystemGuard app:
6475

6576
.. code:: bash
6677
6778
sudo systemguard-installer --install
6879
6980
.. code:: bash
70-
81+
7182
# if above command doesn't work, try full path
7283
sudo /usr/local/bin/systemguard-installer --install
7384
74-
4. Access the SystemGuard app by visiting the following URL in your
85+
3. Access the SystemGuard app by visiting the following URL in your
7586
browser:
7687

77-
`http://localhost:5050 <http://localhost:5050>`_
88+
.. code:: bash
7889
79-
5. Sign in with the default credentials:
90+
http://localhost:5050
91+
92+
.. note::
93+
94+
Sign in with the default credentials:
95+
96+
- default Username: ``admin``
97+
- default Password: ``admin``
98+
99+
.. note::
100+
101+
It is recommended to change the default password after logging in.
80102

81-
- Username: admin
82-
- Password: admin
103+
4. Once logged in, you can start monitoring your server's performance.
83104

84-
6. Once logged in, you can start monitoring your server's performance.

docs/introduction.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ Features 🚀
3838
to the latest version to simplify maintenance.
3939
- Real-time monitoring capabilities to keep track of server performance
4040

41-
By default, SystemGuard is running on 5050 port and prometheus is running on 9090 port.
41+
.. note::
42+
By default, SystemGuard is running on 5050 port and prometheus is running on 9090 port.

0 commit comments

Comments
 (0)