Why does the cronjob not run as root while the manual command works fine?

thimplicity

Member
Feb 4, 2022
89
14
13
45
Hi everyone,
I have installed scrutiny on my proxmox server and when I manually execute the command, it runs through fine, but when I add it to crontab -e for root, it errors out with the following error message: "ERROR: DependencyMissingError: "smartctl binary is missing"

This is the command manually:
/opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --host-id "Proxmox Homelab" --api-endpoint "http://10.23.1.1:8180"
This is the commend when executing crontab -e as root:
0 22 * * * /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --host-id "Proxmox Homelab" --api-endpoint "http://[I]10.23.1.1[/I]:8180"

Thanks for some guidance!
 
Last edited:
"ERROR: DependencyMissingError: "smartctl binary is missing"
You maybe forgot the smartctl? may you try as the following?

Bash:
0 22 * * * /sbin/smartctl /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --host-id "Proxmox Homelab" --api-endpoint "http://[I]10.23.1.1[/I]:8180"
 
You maybe forgot the smartctl? may you try as the following?

Bash:
0 22 * * * /sbin/smartctl /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --host-id "Proxmox Homelab" --api-endpoint "http://[I]10.23.1.1[/I]:8180"
Thanks, but apparently this was not it. New error message from smartctl:

=======> UNRECOGNIZED OPTION: host-id Use smartctl -h to get a usage summary