Rust Monitoring Board(Rumbo) - is a dashboard for collecting metrics like a server info(CPU, RAM, health checks etc.), logs, and error aggregation.
{
"instance_name":"INSTANCE_ID",
"timestamp":"CREATING_DATE",
"metric_value":{}
}[
{
"metric_type":"RamSpace",
"free_amount": 0,
"total_amount": 0
},
{
"metric_type":"CpuUsage",
"core":"1",
"load_percents": 120
},
{
"metric_type":"DiskUsage",
"name":"Disk1",
"load_percents": 120,
"reading_speed": 2000,
"writing_speed": 2000
},
{
"metric_type":"NetworkUsage",
"sending_speed":100,
"receiving_speed":100,
"name": "some_adapter"
},
{
"metric_type":"DiskSpace",
"name":"Disk1",
"free_amount":0,
"total_amount":0
}
]Angular frontend part
Binary file. It will contains only configuration of the web server. It should be as less as possible
This project will contain all business logic for our project.
The profit of this separation that rumbo_logic could be covered fully by tests and by default rust lib projects contains test samples.
In case you don't want to install diesel, postgres, rust locally you should do the next steps:
- docker-compose build
- Run the DB and Adminer only in docker
- Go to rumbo_logic/migrations
- Run all Up.sql through the adminer console (localhost:8080) in docker
- Run the webapp In case of new version you need to drop db and repeat all these steps
- Install postgres libraries(libpq). You can do in on the official website of Postgres
- Add to the PATH(if you are windows user) the following folders(your path or version of Postgres could be different):
- C:\Program Files\PostgreSQL\15\bin
- C:\Program Files\PostgreSQL\15\lib
- Add new environment variable PQ_LIB_DIR = C:\Program Files\PostgreSQL\15\lib
- Run: cargo install diesel_cli --no-default-features --features postgres
- Now create .env file in the root of the repo
- Write there: DATABASE_URL=postgres://postgres:example@localhost/rumbo_app
- Run: diesel setup
- Run: diesel migration run
In case of moving or renaming files is better to keep the history of previous changes in this section you could find a guide how to do it.
Move files with git and keep file history Be sure you don't have files uncommitted, if not commit them before next step.
git status
In project-directory create FOLDER subfolder
mkdir FOLDER
Move files with git mv except FOLDER subfolder to avoid errors
for file in $(ls | grep -v 'FOLDER'); do git mv $file FOLDER; done;
Move specific files...
git mv FILE FOLDER/
Commit changes
git commit -m 'Moved files to FOLDER/'
That's all !
git log -M summary
Commands for Dockerfile:
- docker run --name rumbo -p 8080:8080 -it rumbo
- docker build . -t rumbo
Commands for Docker Compose:
- docker-compose build
- docker-compose up
