Skip to content

DisorganizedWizardry/TrueNAS-smartctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TrueNAS-smartctl

Install the script on TrueNAS

Copy smart-truenas.py to your TrueNAS server

Logstash config

Here is the config for logstash.

input {
  tcp {
    port => 4000
    codec => "json"
    ecs_compatibility => "disabled"
  }
}

Run the script

Once you have logstash setup, run the script

Usage: python3 smart-truenas.py [ip_address] [port]

Setup the crontab on TrueNAS

Create a cron job to export drive stats.

Cron job

Troubleshooting

The script relies on smartctl to output json, make sure the below commands work.

The command to scan for drives.

smartctl -j --scan

The command that is run for each drive.

smartctl -j -a [drive]

If you get the Failed to send errors, check the logstash config.

Failed to send : /dev/da0
Failed to send : /dev/da1
Failed to send : /dev/da2
Failed to send : /dev/da3

About

Send drive stats from TrueNAS to logstash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages