node-exporter-textfile-collector-scripts icon indicating copy to clipboard operation
node-exporter-textfile-collector-scripts copied to clipboard

fixed issue when run from crontab

Open saeed-mcu opened this issue 2 years ago • 2 comments

Signed-off-by: Saeed [email protected]

when run from crontab lvs , pvs , vgs command make error and exit code 127 which means command not found and if i use full path for command everything works well

saeed-mcu avatar Jun 25 '22 14:06 saeed-mcu

If these commands were failing as "not found", this merely suggests that your cron environment is lacking /usr/sbin in its path, which I find a bit odd.

You could merely add an explicit PATH in your cron entry which calls this textfile collector, but again, I find it quite strange that this would be needed.

dswarbrick avatar Jun 25 '22 15:06 dswarbrick

@saeed-mcu Please rebase on master and fix the merge conflicts. This PR also adds new metrics, which is not mentioned in the description, and should be split off to a separate PR.

dswarbrick avatar May 19 '23 15:05 dswarbrick

Closing due to inactivity. Also, hardcoded paths in scripts generally cause more problems than they resolve. Fix you PATH in your crontab if this is still an issue for you.

dswarbrick avatar May 08 '24 20:05 dswarbrick