Hello SMB Admins!
I am writing a script that is checking some key SMB sensors and sending e-mail should any of them goes outside pre-define thresholds.
It is currently evaluating:
- Cooling fan speed
- CPU temperature
- Motherboard temperature
- Amount of free OS memory
- Free disk space on /storage, /logs and /pfrm2.0 volumes
- Load average (1 min)
- Voltage readings
- Core dump
- ICMP probes
The script is written in LUA which is very light and fast embedded script language. You can review it with any text editor.
It currently works on 14x0 appliances only.
If you want to try it:
1. Copy the attached two files to the appliance. You may put them in /logs/smb_health_check/ so that they are not deleted on firmware upgrade. Or anywhere else, doesn't matter.
2. Using vi, edit smb_health_check.cfg. Set as a minimum, e-mail sender and recipient and IP of your mail server (which must be accessible from the appliance of course).
3. You may check pre-defined thresholds for the different sensors and adjust them as needed for your environment.
4. Test-run the script:
expert# chmod 700 smb_check_health.lua
expert# ./smb_health_check.lua
5. If you like, run it as a cron job every 5 minutes or so.
Careful with the comma's in the config file or script will fail
Questions or suggestions are welcome. Mind that I am still working on it so not everything is polished yet.