-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from gmemstr/rewrite
WIP: Rewrite
- Loading branch information
Showing
49 changed files
with
703 additions
and
1,587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,4 @@ | ||
Scripts/aor_output/* | ||
config.json | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
Scripts/aor_config\.json | ||
.idea/ | ||
.secret | ||
stats.json | ||
client/config.yml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,70 @@ | ||
![https://img.shields.io/badge/Status-v3.0%20In%20Progress-green.svg](https://img.shields.io/badge/Status-v3.0%20In%20Progress-green.svg) | ||
|
||
# Platypus | ||
## Simple realtime server monitoring | ||
|
||
[![https://img.shields.io/badge/demo-status.gmem.ca-black.svg](https://img.shields.io/badge/demo-status.gmem.ca-black.svg?style=for-the-badge)](https://status.gmem.ca) | ||
[![https://img.shields.io/badge/frontend-gmemstr%2Fplatypus--react-blue.svg](https://img.shields.io/badge/frontend-gmemstr%2Fplatypus--react-blue.svg?style=for-the-badge)](https://github.com/gmemstr/platypus-react) | ||
|
||
### Dependencies | ||
|
||
```bash | ||
go get github.com/gorilla/mux | ||
go get github.com/gorilla/websocket | ||
go get github.com/go-yaml/yaml | ||
go get github.com/shirou/gopsutil | ||
``` | ||
|
||
### Usage | ||
|
||
Master server: | ||
```bash | ||
go build -o platypus main.go | ||
chmod +x platypus | ||
./platypus | ||
``` | ||
|
||
Client servers: | ||
```bash | ||
go build -o platypus_client client/client.go | ||
chmod +x platypus_client | ||
nano config.yml | ||
# Input your secret key and master server IP here, secret key found on master server in .secret | ||
# master: example.com | ||
# secret: s3cr3tk3y | ||
# End config | ||
./platypus_client | ||
``` | ||
|
||
Navigate to your master server and check out the stats. | ||
|
||
[Live Stable Branch](https://status.ggserv.xyz) | ||
## Rewrite | ||
|
||
Active online and usage monitor using websockets and Python | ||
Rewriting this from the ground up. Why did I do this in Python. | ||
|
||
The goal of the rewrite is to move away from using Python for the entire stack | ||
and instead break things up into smaller chunks, maybe moving this to it's own | ||
GitHub / Gitlab org, which will allow it to be much more modular and open ended | ||
when it comes to what kind of information you want to monitor and how. | ||
|
||
## Features | ||
- Setup script | ||
- Websocket-based uptime monitoring (**AOR**) | ||
- Auto-post to Slack when server goes offline | ||
- Provide live server usage statistics with web frontend | ||
- Simple JSON API for building apps | ||
- Admin interface for managing servers | ||
### Steps | ||
|
||
## Getting Started | ||
1. Rewriting the core functionality, which is a basic stats dashboard | ||
and server management through an admin interface. We also want to rethink how to | ||
handle Active Online Reporting - websockets still _seems_ like the best option | ||
for this but there's got to be a better way. Might opt for Go master server | ||
side as it's something I have experience in and should offer good performance etc. | ||
|
||
Please see the wiki page [Getting Started](https://github.com/gmemstr/Platypus/wiki/Getting-Started) | ||
2. Rebuild the client based on the specifications of #1, and deciding the best | ||
way to build and distribute the package w/ configuration - I personally want to | ||
go with something we can compile into a very small package and ship with a | ||
master server-generated configuration file of some sort. Was thinking C++ might | ||
be a good option over Go size wise but there could be additional time overhead. | ||
|
||
## Requirements | ||
- Python 3.x (2.x not officially supported) | ||
- pip | ||
- `pip install -r requirements.txt` | ||
- MariaDB or MySQL | ||
3. Write a straightforward API both client (or "node") side, which would allow | ||
applications to construct and send custom messages to the master server, and | ||
master server side, which will handle said customer messages. This should be fairly | ||
straightforward once we have #1 and #2 complete. | ||
|
||
## Running | ||
See [Getting Started](https://github.com/gmmemstr/Platypus/wiki/Getting-Started) | ||
4. A plugin system - I don't really know what form this would take since it's pretty | ||
far down the line, but it's something to consider. Some sort of simple scripting | ||
language that we can easily write an interpreter for in Go for the master server and | ||
would expose various variables / functions. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.