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

thimplicity

Member
Feb 4, 2022
73
9
13
44
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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!