New CLI Tool 'v-system-report' for Comprehensive Server Health Check

Post Reply
User avatar
webxtek
Posts: 67
Joined: Wed Nov 18, 2020 7:43 pm
Been thanked: 2 times

Detailed report about your server's system resources, services, and configurations. It can be customized to enable or disable specific checks based on your needs.

Understand What the Script Does
The `v-system-report` script collects and displays information about your server's health and configuration. It includes checks for:
- System resources (CPU, memory, disk usage)
- Running services (like Nginx, Apache, MySQL, etc.)
- Network status and open ports
- And more, depending on customization.

You can enable or disable specific parts of the report by editing the script. For example, to disable system resource checks, you can set `CHECK_SYSTEM_RESOURCES=false` inside the script. Similarly, other checks can be toggled by modifying the respective variables at the top of the script.

Please note that the AI feature included in the script is still very premature and was developed as a playful experiment. It is not fully reliable for analysis and should be considered an experimental addition. Additionally, keep in mind that this script is a beta version developed for personal use. You should not rely on it 100% for critical system analysis, as it is still under development and may contain bugs or incomplete features.

Step 1: Create the v-system-report Script
Navigate to the Vesta bin directory where custom scripts are typically stored:

Code: Select all

cd /usr/local/vesta/bin
Create the script file using `nano`:

Code: Select all

nano v-system-report
Paste the contents of the `v-system-report` https://github.com/webxtekagency/myvest ... tem-report script into the file

Save and exit `nano` (Ctrl+O, Enter, Ctrl+X).

Step 2: Make the Script Executable
Set the appropriate permissions to make the script executable:

Code: Select all

chmod +x v-system-report
Ensure that the script is owned by the root user for security reasons:

Code: Select all

chown root:root v-system-report
Step 3: Run the Script
To generate a system report, simply run the script:

Code: Select all

v-system-report
Logging and Email Report
Every time you run the `v-system-report` script, it automatically creates a log file with all the details of the report. The log files are stored at:

Code: Select all

/var/log/v-system-report/
Each log file is named with the date and time of execution, making it easy to track historical reports.

If email notifications are enabled (by default), the script will also send a detailed HTML report to the admin email configured in MyVestaCP. This allows you to receive system health updates directly in your inbox.

How to Schedule Daily Reports with Cron in MyVestaCP
You can automate the execution of the script by adding a cron job in the MyVestaCP panel. This way, you will receive a daily report without manual intervention.

To add a daily cron job at 23:50, follow these steps:

1. Go to the MyVestaCP panel and navigate to Server > CRON.
2. Click on ADD CRON JOB.
3. In the command field, enter:

Code: Select all

sudo /usr/local/vesta/bin/v-system-report >/dev/null 2>&1
4. Set the schedule as follows:
- Minute: `50`
- Hour: `23`
- Day: `*`
- Month: `*`
- Day of week: `*`
5. Save the cron job.

This will run the system report script every day at 23:50.

Let me know if you have any questions or need help customizing the script! :mrgreen:
Last edited by webxtek on Tue Jun 03, 2025 10:43 pm, edited 1 time in total.
User avatar
mixxa
Posts: 2
Joined: Sat Jun 03, 2023 6:57 pm
Your location: 127.0.0.1

Added it the same day you wrote this post. Works nice, but it keeps sending two different emails, one is html one, and one is plain txt. Also it's showing warning for AI API key missing.
spanishnerd
Posts: 1
Joined: Tue Jun 03, 2025 10:25 pm

hey, can we change the fail2ban top 10 section to show weekly data?
User avatar
webxtek
Posts: 67
Joined: Wed Nov 18, 2020 7:43 pm
Been thanked: 2 times

mixxa wrote: Tue Jun 03, 2025 7:22 pm Added it the same day you wrote this post. Works nice, but it keeps sending two different emails, one is html one, and one is plain txt. Also it's showing warning for AI API key missing.

Hi mate,

Thanks for the feedback! The plain text email is likely from the cron job.
In the MyVesta panel, click the "EDIT" button next to the cron job
The current command is:

Code: Select all

sudo /usr/local/vesta/bin/v-system-report
Modify the command to:

Code: Select all

sudo /usr/local/vesta/bin/v-system-report >/dev/null 2>&1
For the AI API key warning, you need to create a token at https://huggingface.co/settings/tokens with all Inference boxes checked. Make sure to add the key to the AI_API_KEY="" line in the v-system-report script.

I’ve also updated the script to fix the backup section bug. You can grab the latest version here: https://github.com/webxtekagency/myvest ... tem-report.
Cheers
Post Reply