Configuring A Daily SoftNAS Health Check Report Summary
Symptoms:
The newly-built SoftNAS daily report script allows customers to receive daily health checks report of their SoftNAS nodes i.e replication status and other health parameters through email. The output of the script sent through email will give you the ability to check the system health quickly. However, you can also run the script manually to check the system health status during peak time.
As per the script output it displays the replication role, server uptime, CPU load or IOwait, RAM usage, Root volume space, Pool space, Replication health, Number of network share connections like NFS or SMB and License status with recommended values. Recommended values indicates optimal performance for the system health but if you notice any anomalies for example the values are going up than the recommended ones then we suggest to contact support.
Purpose
This knowledge base article covers the basic steps and key considerations to configure a daily health check email notification parameter as per the health status of your SoftNAS node.
Resolution
Below is a step by step guide in configuring the daily health check report summary.
Summary of the script;
a. Quick overview of system health.
b. No need to browse through Softnas UI/Dashboard or use CLI
c. Get an idea of the recommended optimal values
d. System resource utilization.
Steps:
- Download the script from here and upload it to the SoftNAS node /var/www/softnas/scripts location and give it executable permission with root user ownership.
Note: If you have a replication/HA pair then you need to upload it to both the nodes to get the daily health report. Then create a cron job using below commands
2. Run the below commands to change the script ownership and give it executable permission.
# chmod 755 SoftnasDailyReport.py
# chown root:root SoftnasDailyReport.py
3. To configure the script as a cron job run the below command;
# vi /etc/cron.d/dailyreport
Copy and paste the below entry into the dailyreport file and save it.
>> 0 6 * * * root /var/www/softnas/scripts/SoftnasDailyReport.py
The above cron job will be executed everyday at 6 am but you can adjust it as you deem fit.
To configure the mail section please edit the below SoftNAS credential section of the script prior to deploying it.
# softnas_credential = os.getenv('softnas_credential')
# email_user = 'email_user'
# email_pass = os.getenv('email_pass')
# email_from = 'email_from_address@my-domain.com'
# email_to = 'email_to_address@other-domain.com'
# email_server = 'email_server.my-domain.com'
To hide the plain text password you can set environment variables as per the below example through CLI.
Environment vars >>
# export softnas_credential='Pass4W0rd'
# export email_pass='hdkrymdjlksl7494'
An example image of the daily report email below: