Helo there,
I have a brand new N100/Mini ITX based system running TrueNAS SCALE 24.10.2 since few weeks (16G of RAM, 1xRAIDZ2 6 wide, encrypted datasets).
However, few times, after massive import of photos in Immich, CPU temp goes super high and I assume it lead my system to reboot (I will replace the cooler / thermal paste to investigate).
This leads me to raise this question: Why don’t I have an alert of “cold reboot”? My system reboots and start like nothing happened but, as I have set encryption, I am not notified that I have to unlock before getting users’ complains 
I tried to search the forum and the doc but I feel I’m missing something.
TY for the help
What alerts have you setup?
I have the default one and setup Telegram Alert Service (working when I have an issue with a cron job for ex) at level Warning.
I was expecting to get some alerts based on:
-
Share Is Unavailable Because It Uses A Locked Dataset
-
Failover Event Caused System Reboot
-
Fenced Caused System Reboot
(these are at least Warning and Immediately)
I just setup email in parallel to double check if the issue comes from Telegram Alert Service
FYI I did a dirty fix where I created a Command ran Post init in
System\Advanced Settings\Init/Shutdown Scripts wit the following command
midclt call mail.send '{"subject": "TrueNAS Boot Alert", "text": "TrueNAS has booted successfully!"}'
It just requires an email, used as sender, at the user level and voila! I got notified by email that my TrueNAS woke up and it is waiting for unlock 
Feel free if you see any better way of doing this 
And for those finding this message because they also have temperature issue on N100 based mini-itx motherboard, changing the stock thermal paste changed A LOT. My system was reaching 80 degrees often under heavy load and now it seems contained to 60/70 max
1 Like
Did you figure out how to also send a message when shutting down/rebooting the system? Message on boot is great, but it would also be great to know on shutdown, in case system doesn’t came back up.
Another way to handle that is to monitor the server from another system on the same network. If it stays down longer than X minutes that monitor then alerts you.
This would help catch situations where your server goes down without running through the ordinary shutdown sequence, which would make it more resilient in my humble opinion.
Uptime Kuma can do this, but there is almost an endless number of tools offering similar features. (slight exaggeration)
^^Key word they’re on the same network. My use case would be a remote system. I really just want to keep an eye on if it’s being tampered with at all.
Edit: spelling/grammar.
In that case you can use a VPN.
In the same vein, you can setup another command but When=Shutdown.
Shutdown is during the system power off process.
Do you have documentation for this? I can’t seem to find any.
I suspect I’ll run into the same issue. The script/command is getting launched, but is then shutdown/killed before it can complete the task.
A very messy way as a last resort would be to make your own Docker container which has an entrypoint which captures the SIGTERM signal and does what you want. So, the container would need a mail sending program. You’d never touch this container, so, the only time it should stop is shutdown or reboot.
Again, messy, it’s possible to do, but far from ideal.
I suppose you could make a systemd service which has correct targets and afters to send mail at the right time, and inject this at startup via startup script.