dak180 / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS/TrueNAS
GNU General Public License v3.0
38 stars 8 forks source link

Not receiving emails #24

Closed SatanOrLucifer closed 1 year ago

SatanOrLucifer commented 1 year ago

Idk what I'm doing wrong, set up the config with the email I'd like it to be sent to, but haven't received any emails after running the cronjob a few times. I set root users email to root@truenas.local. My only thought is that the email I'm trying to send it to uses 1and1 servers and that might be causing an issue? Would love any help I can get :(

dak180 commented 1 year ago

Please attach a copy of your config file for the script.

SatanOrLucifer commented 1 year ago

Couldn't copy the cfg to github, says its not supported. Will copy and paste suffice?

Set this to 0 to enable

defaultFile="0"

User-definable Parameters

Email Address

email="Deleted for Privacy"

Global table colors

okColor="#c9ffcc" # Hex code for color to use in SMART Status column if drives pass (default is light green, #c9ffcc) warnColor="#ffd6d6" # Hex code for WARN color (default is light red, #ffd6d6) critColor="#ff0000" # Hex code for CRITICAL color (default is bright red, #ff0000) altColor="#f4f4f4" # Table background alternates row colors between white and this color (default is light gray, #f4f4f4)

zpool status summary table settings

usedWarn="90" # Pool used percentage for CRITICAL color to be used scrubAgeWarn="30" # Maximum age (in days) of last pool scrub before CRITICAL color will be used

SMART status summary table settings

includeSSD="true" # Change to "true" to include SSDs in SMART status summary table; "false" to disable includeSAS="false" # Change to "true" to include SAS drives in SMART status summary table; "false" to disable lifeRemainWarn="75" # Life remaining in the SSD at which WARNING color will be used lifeRemainCrit="50" # Life remaining in the SSD at which CRITICAL color will be used totalBWWarn="100" # Total bytes written (in TB) to the SSD at which WARNING color will be used totalBWCrit="200" # Total bytes written (in TB) to the SSD at which CRITICAL color will be used tempWarn="35" # Drive temp (in C) at which WARNING color will be used tempCrit="40" # Drive temp (in C) at which CRITICAL color will be used ssdTempWarn="40" # SSD drive temp (in C) at which WARNING color will be used ssdTempCrit="45" # SSD drive temp (in C) at which CRITICAL color will be used sectorsCrit="10" # Number of sectors per drive with errors before CRITICAL color will be used testAgeWarn="5" # Maximum age (in days) of last SMART test before CRITICAL color will be used powerTimeFormat="ymdh" # Format for power-on hours string, valid options are "ymdh", "ymd", "ym", or "y" (year month day hour)

TrueNAS config backup settings

configBackup="true" # nge to "false" to skip config backup (which renders next two options meaningless); "true" to keep config backups enabled emailBackup="true" # Change to "true" to email TrueNAS config backup saveBackup="false" # hange to "false" to delete TrueNAS config backup after mail is sent; "true" to keep it in dir below backupLocation="/root/backup" # Directory in which to save TrueNAS config backups

UPS status summary settings

reportUPS="false" # Change to "false" to skip reporting the status of the UPS

General script settings

logfileLocation="/mnt/main/Script/log" # save TrueNAS log file. Can be set to /tmp. logfileName="dailylog" # e saveLogfile="true" # Change to "false" to delete the log file after creation

Drive Overrides

In the form: declare -A _

And then for each override: _[]=""

Replace any non ascii alphanumeric characters with _ in the serial.

SatanOrLucifer commented 1 year ago

Just deleted that last config and generated a new one and set it up again, still not getting email after running a test though.

Set this to 0 to enable

defaultFile="0"

User-definable Parameters

Email Address

email="Deleted For Privacy"

Global table colors

okColor="#c9ffcc" # Hex code for color to use in SMART Status column if drives pass (default is light green, #c9ffcc) warnColor="#ffd6d6" # Hex code for WARN color (default is light red, #ffd6d6) critColor="#ff0000" # Hex code for CRITICAL color (default is bright red, #ff0000) altColor="#f4f4f4" # Table background alternates row colors between white and this color (default is light gray, #f4f4f4)

zpool status summary table settings

usedWarn="90" # Pool used percentage for CRITICAL color to be used scrubAgeWarn="30" # Maximum age (in days) of last pool scrub before CRITICAL color will be used

SMART status summary table settings

includeSSD="true" # Change to "true" to include SSDs in SMART status summary table; "false" to disable includeSAS="false" # Change to "true" to include SAS drives in SMART status summary table; "false" to disable lifeRemainWarn="75" # Life remaining in the SSD at which WARNING color will be used lifeRemainCrit="50" # Life remaining in the SSD at which CRITICAL color will be used totalBWWarn="100" # Total bytes written (in TB) to the SSD at which WARNING color will be used totalBWCrit="200" # Total bytes written (in TB) to the SSD at which CRITICAL color will be used tempWarn="35" # Drive temp (in C) at which WARNING color will be used tempCrit="40" # Drive temp (in C) at which CRITICAL color will be used ssdTempWarn="40" # SSD drive temp (in C) at which WARNING color will be used ssdTempCrit="45" # SSD drive temp (in C) at which CRITICAL color will be used sectorsCrit="10" # Number of sectors per drive with errors before CRITICAL color will be used testAgeWarn="5" # Maximum age (in days) of last SMART test before CRITICAL color will be used powerTimeFormat="ymdh" # Format for power-on hours string, valid options are "ymdh", "ymd", "ym", or "y" (year month day hour)

TrueNAS config backup settings

configBackup="true" # Change to "false" to skip config backup (which renders next two options meaningless); "true" to keep config backups enabled emailBackup="true" # Change to "true" to email TrueNAS config backup saveBackup="false" # Change to "false" to delete TrueNAS config backup after mail is sent; "true" to keep it in dir below backupLocation="/root/backup" # Directory in which to save TrueNAS config backups

UPS status summary settings

reportUPS="false" # Change to "false" to skip reporting the status of the UPS

General script settings

logfileLocation="/tmp" # Directory in which to save TrueNAS log file. Can be set to /tmp. logfileName="logfilename" # Log file name saveLogfile="true" # Change to "false" to delete the log file after creation

Drive Overrides

In the form: declare -A _

And then for each override: _[]=""

Replace any non ascii alphanumeric characters with _ in the serial.

dak180 commented 1 year ago

Have you tried to get TrueNAS to generate a test email notification?

SatanOrLucifer commented 1 year ago

I have not, I will look into how to do that now!

SatanOrLucifer commented 1 year ago

Got it working, couldn't use the 1and1 email as the send email, made a gmail account for truenas to send emails from, then it worked just fine. Thanks!