Closed l-ucky closed 1 month ago
Arch Linux doesn't use cron by default, so I wrote a systemd timer.
Below is: /etc/systemd/system/smartmonitor.service
[Unit] Description=S.M.A.R.T Monitor script and textfile_collector for Grafana After=multi-user.target [Service] Type=forking ExecStart=/usr/bin/env bash /usr/local/bin/smartmon.sh > /var/lib/node_exporter/textfile_collector/smart_metrics.prom WorkingDirectory=/var/lib/node_exporter/textfile_collector/ [Install] WantedBy=multi-user.target
Below is: /etc/systemd/system/smartmonitor.timer
[Unit] Description=Run S.M.A.R.T script and collect data for grafana [Timer] OnBootSec=15min OnUnitActiveSec=240min [Install] WantedBy=timers.target
Thanks for your input! I implemented your suggestion in an install script.
Arch Linux doesn't use cron by default, so I wrote a systemd timer.
Below is: /etc/systemd/system/smartmonitor.service
Below is: /etc/systemd/system/smartmonitor.timer