Multi-Report

I have no doubt that this is a dumb question but where do I find beta 7?
I looked in github and the latest I see is:
“multi_report_v3.1_2024_12_11.txt”

Thanks!

Not dumb, it still sits on my computer. I had a Pet emergency and a programming screw up so I’m about 6 hours behind. I hope to post Beta7 tonight.

The documents are located in my Github account (link should be in the first posting). I’m not the best document writer, even though my job was writing military weapon system documents and procedures. Work is one thing, hobby quite another thing.

1 Like

Holy moley…I’m so sorry! Good luck with the pet and thanks for all you do!!!

The Truenas Reporting UPS is pretty good overall and shows the needed information as averages. The Netdata is more detailed with the default update I think at every 30 seconds and a default graph detail of the last 6 minutes so the graphs show more detail of what is reported by the UPS itself. For example I can see when the load on the UPS changes and by how much.
I don’t know if there are any alarms that can be emailed, but the Alerts setup in the Truenas system should do that to indicate loss of power etc.

1 Like

That’s a good idea. Yes, perhaps with TN and also with Netdata and a bit of thinking, I might not even need that script. Thanks!

Multi-Report Version 3.1 is published!

Notes:

  1. When you update you will notice the “new version” is just called “multi_report.txt” and that is due to a change in the way versioning will be working. Yes, I’m finally conforming to what others do on GitHub, well that is the goal.
  2. If you do not have Automatic Updates setup (I prefer to leave it Manual), run the script multi_report.sh -update to grab and install these updates.
  3. Two more additional pieces of software will also be downloaded:
    a. Drive_Selftest.sh (The script that actually tests the drives)
    b. Sendemail.py (TrueNAS 24.10.1 removed sendmail so @oxyde created a small Python script which now replaces sendmail so we can send email reports.

This was expected to be Beta 7 however I feel it is really close and if there are problems, well just like before, I will provide updates as quickly as possible.

If you see a problem, please inform me either via joeschmuck2023@hotmail.com or send me a Message on the forums here.

If you see a possible improvement, please say something. A Typo, yes that too.

Cheers!

6 Likes

The update was idiot proof:

root@truenas[/mnt/mainraid/scripts]# ./multi_report.sh -update
Multi-Report v3.0.7 dtd:2024-06-08 (TrueNAS Scale 24.10.1)
Update Script Routine
Removing Old Script Source if it exists
Downloading new script files
 
Your current version is: multi_report_v3.0.7_2024_06_08.txt
     The new version is: multi_report.txt
 
File is valid
Enter 'y' to commit or any other key to abort.
y
Updating Script...
3
2
1
 
Your script has been updated and a new copy of the User Guide and changelog is in your directory.
Exiting...
root@truenas[/mnt/mainraid/scripts]# 

and I’ll test it shortly. Thanks for all of this astonishing effort, which I have failed to follow. Well beyond me!

and the testing:

root@truenas[/mnt/mainraid/scripts]# ./multi_report.sh 
TrueNAS does not support sendmail function, using sendemail.py to send you your email.
Multi-Report v3.1 dtd:2025-01-17 (TrueNAS Scale 24.10.1)
Found Old Configuration File
Automatically updating configuration file...
Continuing to run script
Checking for Updates
   1. Multi-Report - Installed: 3.1, GitHub:  3.1
   2. Drive_Selftest - Installed: 0, GitHub: 1.02
   3. sendemail.py - Installed: 0, Github: 0.06
UPDATE AVAILABLE
Update Script Routine
Removing Old Script Source if it exists
Downloading new script files
 
Sendemail.py current version is: 0
The new version is: 0.06
 
Automatic Update is Enabled...
Updating Script...
 
Your script has been updated.
Installing Drive-Selftest Script.  This is a companion to Multi-Report in order to test the drives out.
this will become a seperate function in the next version of the script.
Updating statistical data file to new version.
Running Drive Self-test Script: /mnt/mainraid/scripts/drive_selftest.sh
 
Joe's SMART Drive Self-test Script - Run: 17 January 11:06:13 PM
Script Version: 1.02 (17 January 2025), TrueNAS Scale 24.10.1
'/mnt/mainraid/scripts/DS_Logs' does not exist, attempting to create it...
Success
 
Logging Enabled
Using External Configuration File
 
  Short Test Mode:(3) "No SMART Testing Selected", Short Testing will not be executed.
 
  Long Test Mode:(3) "No SMART Testing Selected", Long Testing will not be executed.
 
NO SHORT TESTS TO RUN
 
NO LONG TESTS TO RUN
 
23:06:15.13:  Drive-Selftest Wrapping things up...
Elapsed Time: Program 0 minutes and 1.97 seconds elapsed.
 
Saving Log (file name: /mnt/mainraid/scripts/DS_Logs/drive_test_17.txt)
Exiting Joe's SMART Drive Self-test Script
Collecting Report Data...
Sending Email Courtesy of @oxyde
root@truenas[/mnt/mainraid/scripts]# 

Followed by my receiving an email which says (snipped screenshot):

along with ten attachments (config tar, an old multireportconfig.txt, a multireportconfig.txt, a statsmartdata csv and six .partitions … [names paraphrased for brevity]).

So I am delighted and it is all working, and I am pretty clueless but even I followed how to do it!

Thanks!

Hi @joeschmuck , I just updated to v3.1. Update seems to have worked okay.
At the top of the report it does say there’s an update available for sendemail. How do I update this?
Also, my ‘sender’ information of the email is a ‘>’ with nothing else. Where do I fix that?

Thanks for the hard work.

I changed the way updates are done. You should not see those updates again unless a file needs to be updated. The script will automatically update if the file it is looking for does not exist. I will hopefully fix this in the next change.

Now the next question will be about SMART testing. By default it is disabled, just in case someone has tests scheduled via TrueNAS GUI. You can change this using either -config or just open the file multi_report_config.txt and scroll to the bottom. You will see Short and Long test sections. Examine the text, I tried to make it clear. Change the test Mode from “3” which means no testing, to “2” to test everytime the script is run, which should be daily. Test Mode “1” has a different effect. Read about it in the Drive Selftest User Guide which should be in your script folder. That is actually important.

Sorry, I beat this text on my phone so it may look poorly formatted.

Sorry, just saw that when I used a computer vice phone.
I do not understand. You have my email, can you grab a screen shot?

@GrimmReaperNL can i ask you how do you config your email on TN? Hide sensitive data!
Just for understand if Is something i can fix!

Receiving cron emails with errors after the updates. Sent -dump all for review.

./temprunfile.sh: line 4434: Drive ZTN0FH0T actual Power On Hours = 21274
Drive ZRT0ZFBQ actual Power On Hours = 10422
Drive ZRS0NDW9 actual Power On Hours = 10692
Drive ZL2M7RRD actual Power On Hours = 21258
Drive ZR807XE6 actual Power On Hours = 10423
Drive ZRS0PYLT actual Power On Hours = 10740
: File name too long
./temprunfile.sh: line 4434: Drive ZTN0FH0T actual Power On Hours = 21274
Drive ZRT0ZFBQ actual Power On Hours = 10422
Drive ZRS0NDW9 actual Power On Hours = 10692
Drive ZL2M7RRD actual Power On Hours = 21258
Drive ZR807XE6 actual Power On Hours = 10423
Drive ZRS0PYLT actual Power On Hours = 10740
Drive ZRT1A0XS actual Power On Hours = 6479
: File name too long
./temprunfile.sh: line 4434: Drive ZTN0FH0T actual Power On Hours = 21274
Drive ZRT0ZFBQ actual Power On Hours = 10422
Drive ZRS0NDW9 actual Power On Hours = 10692
Drive ZL2M7RRD actual Power On Hours = 21258
Drive ZR807XE6 actual Power On Hours = 10423
Drive ZRS0PYLT actual Power On Hours = 10740
Drive ZRT1A0XS actual Power On Hours = 6479
Drive ZRT1HTXM actual Power On Hours = 3421
: File name too long

Thanks @joeschmuck and @oxyde for the work and the update…

All working fine now again

2 Likes

Please run with -dump emailextra from the CLI/SSH/Shell to send me specific information.
What I’m a bit confused about is the temprunfile.sh issue. I know what this file is however you should not be seeing this.

Also, when you send that dump to me, please let me know what the command is in the CRON Job. It should be something like /mnt/farm2/scripts/multi_report.sh if you are running CORE, which is what your equipment states.

As for the Actual Power On Hours, the script thinks it cannot read the drive power on hours for the listed drives. But the main issue is why the temprunfile.sh is an issue.

Done and I sent an email also with a screenshot of the multi-report directory. Both my CORE 13.3 NAS have the same symptoms.

I’m using the Gmail OAuth setting. Is that what you mean?

E-mails still not being sent - have checked the sendemail_log folder, this is what’s being saved there on each attempt:

File /mnt/Tank/Config/sendemail_log/20250118_122936.txt successfully generated
2 totals file log
1 totals attachment
trying read mail.config
read mail.config successfully
Switching for the right provider
** SMTP Version **
parsing smtp config
switch from classic send and bulk email
parsing html content
body is a file
parsing headers
generate a message ID using apikey
KO: list index out of range

Is this what you mean @joeschmuck?


Before 24.10.1 updates it would look like this:

This is my multi_report config:

@GrimmReaperNL i will try to reproduce It, i think to have understand what Is going on, in case i will ask you some more info in private ok?

@Cellobita are you using apikey as SMTP user? Or you just hide It? In this passage i performe a manipulation of the SMTP user to extract the domain that i need to send in the headers to avoid spam or server reject. And i don’t have calc this pattern

@oxyde Yup, all good to contact me :slight_smile: