AnalogJ / scrutiny

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
MIT License
4.72k stars 154 forks source link

[BUG] Cron Schedule not working in v0.8.0 #602

Closed SirOch27 closed 2 months ago

SirOch27 commented 3 months ago

Describe the bug Cron Schedule stop working after upgrade to v0.8.0

Expected behavior Cron Schedule should executed as normal AnalogJ/scrutiny/metrics doesn't start as planned by cron

ghost commented 3 months ago

Can confirm CRON does not work with the omnibus image. However all my collectors work fine

image

DrFrankensteinUK commented 3 months ago

Just to add my two pennies worth, seeing similar here, my container updated on the 14th March and has not pulled data from the drives since that date. I do not have the CRON schedule set so should be running on the default midnight schedule.

My older Unraid install from February is working.

AnalogJ commented 3 months ago

this is probably related to #596 Debian messed around with the filesystem ( /bin vs /usr/bin ) Unfortunately we don't (can't?) do any cron testing in our CI pipeline. Let me see if I can figure this out

popjdh commented 3 months ago

Encountering the same problem. Is there any workaround now that can make cron work. thanks

SirOch27 commented 3 months ago

Encountering the same problem. Is there any workaround now that can make cron work. thanks

hello I am rolling back to version 0.7.3 and is good

artbird309 commented 3 months ago

I just started using Scrutiny with version v0.8.0 on TrueNAS SCALE and was having the same issues with cron not running. I reverted to v0.7.3 and it is now running the scrutiny-collector-metrics run automatically overnight.

b1nary-b0b commented 3 months ago

same issue here with 0.8.0

c0ldtech commented 3 months ago

Stupid question, but how do I revert to 0.7.3 when using docker-compose and the omnibus image? I'm not sure where to actually put the version number/tag.

Edit: leaving this here for other n00bs like me: ghcr.io/analogj/scrutiny:v0.7.3-omnibus - with the tag being found under "packages", "scrutiny", "view all tagged versions".

Edit2: Setting a different cron schedule in docker compose by putting

environment:
      - TZ=Europe/Berlin
      - COLLECTOR_CRON_SCHEDULE = "*/15 * * * *"

still does not seem to work though.

SirOch27 commented 3 months ago

Edit2: Setting a different cron schedule in docker compose by putting

environment:
      - TZ=Europe/Berlin
      - COLLECTOR_CRON_SCHEDULE = "*/15 * * * *"

still does not seem to work though.

Hello,

Try using simple quote:

c0ldtech commented 3 months ago

I already did that too, unfortunately it does not make a difference for me.

It also should show up like that in /etc/cron.d/scrutiny if it was applied successfully, right?

/env.sh does not even contain COLLECTOR_CRON_SCHEDULE - but I'm not sure if it even should.

AnalogJ commented 3 months ago

Hey all, sorry for the delay fixing this issue - life happened.

I've updated the version of s6-overlay and verified the image locally. I'd appreciate it if you could all try it on your machines and confirm below.

AnalogJ commented 3 months ago

Once the Docker images in https://github.com/AnalogJ/scrutiny/actions/runs/8575689484 finish building, you can pull the latest image.

b1nary-b0b commented 3 months ago

Hey,

I pulled master-collector:latest again and now it works! Thanks for the fix! :)

SirOch27 commented 3 months ago

Hello,

The build of the omnibus docker failed. Can you check please @AnalogJ

Cheers

AnalogJ commented 3 months ago

@SirOch27 yeah, but the subsequent build passed. Can you pull the latest image and confirm Cron worked?

SirOch27 commented 3 months ago

Hi @AnalogJ Just tested the omnibus and it works now. Thank you for your support ;-) Cheers

AnalogJ commented 2 months ago

👍 closing!

cmd430 commented 2 months ago

running the latest 0.8.1 via podman and cron still isnt working for me, connecting to the container and manually running scrutiny-collector-metrics run does update the metrics, it just doesnt update automatically. container was created with the following command

sudo podman container run \
  --detach \
  --replace \
  --name scrutiny \
  --volume `pwd`/scrutiny:/opt/scrutiny/config:Z \
  --volume /run/udev:/run/udev:ro \
  --mount type=volume,dst=/opt/scrutiny/influxdb \
  --publish 8085:8080/tcp \
  --device /dev/sda:/dev/sda:rwm \
  --device /dev/sdb:/dev/sdb:rwm \
  --device /dev/sdc:/dev/sdc:rwm \
  --device /dev/sdd:/dev/sdd:rwm \
  --device /dev/sde:/dev/sde:rwm \
  --device /dev/sdf:/dev/sdf:rwm \
  --device /dev/sdg:/dev/sdg:rwm \
  --device /dev/sdh:/dev/sdh:rwm \
  --device /dev/sdi:/dev/sdi:rwm \
  --device /dev/nvme0:/dev/nvme0:rwm \
  --cap-add SYS_RAWIO \
  --cap-add SYS_ADMIN \
  --restart always \
  --pull newer \
  ghcr.io/analogj/scrutiny:latest