S.M.A.R.T-Disk-Monitoring-for-Prometheus. As Storj Node Hdd early warning

Hello, how do you check your HDDs? To prevent one from failing. So that the data can be transferred to a new HDD at an early stage.

I have Setup a smartctl monitoring with regular testing and checking the values which are also monitored by Backblaze: What SMART Hard Disk Errors Actually Tell Us

1 Like

Yea nice , can you help me with configure the same for my system?

I use smartmon script, which is started periodically under cron. Not sure how I got that, but this is the link in the script. Works good.

1 Like

ah ok i know this skript with grafana but i dont kown how using this skript

  1. Download the script exporting smart stats
  2. make it run periodically under cron (crontab -e)
    */5 * * * * /usr/bin/mkdir -p /tmp/node-collectors; /path/to/the/script/smartmon.sh > /tmp/node-collectors/smart.prom
    The stats are exported in the text file /tmp/node-collectors/smart.prom
  3. get the binary and run node_exporter. I use systemd to manage the node exporter, but it probably works under docker:
Description=Collector of server stats for prometheus

ExecStart=/path/to/node_exporter --collector.disable-defaults --collector.cpu --collector.hwmon --collector.meminfo --collector.loadavg --collector.diskstats --collector.filesystem --collector.textfile --collector.textfile.directory=/tmp/node-collectors


You see that besides other server statistics, node_exporter also loads all compatible files from the directory: --collector.textfile.directory=/tmp/node-collectors

Now you can add the node_exporter to the prometheus:

  - job_name: server_name
    scrape_interval: 60s
    scrape_timeout: 10s
      - targets: ["<<add server ip>>:9100"]

Now the data are in the prometheus and the rest is grafana configuration.

1 Like

Ah ok and if i using the nodeexporter as docker? You know the commands?

You add the collector of text files as parameter to node_exporter, I don’t know how you run it with the docker so can’t help further

Hi ok ,if i using the docker or the binare node always say :cant opten the textfile error