Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Allow manual configuration of cron task which runs metrics collector #66

Closed
teambvd opened this issue Sep 29, 2020 · 3 comments · Fixed by #222
Closed

[FEAT] Allow manual configuration of cron task which runs metrics collector #66

teambvd opened this issue Sep 29, 2020 · 3 comments · Fixed by #222
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@teambvd
Copy link
Contributor

teambvd commented Sep 29, 2020

Is your feature request related to a problem? Please describe.
Temperature monitoring should be taken at more regular intervals than every 24 hours. The baked in cron job for this docker image only allows for polling every 24 hours.

Describe the solution you'd like
An update to allow for configurable cron. For docker, a variable called 'SCHEDULE', which accepts cron-style input. i.e. I wish to have metrics collected every 6 hours, so my docker run would look like:

docker run -it --rm -p 8080:8080 \
-v /run/udev:/run/udev:ro \
-e SCHEDULE:0 0/2 * * *\
--cap-add SYS_RAWIO \
--device=/dev/sda \
--device=/dev/sdb \
--name scrutiny \
analogj/scrutiny

Additional context
Allowing the docker image users the same flexibility as those doing a bare install would be fantastic

@AnalogJ
Copy link
Owner

AnalogJ commented Oct 4, 2020

This is a fantastic idea. Let me take a look at the Jobber config and see how hard this would be to implement.

@teambvd
Copy link
Contributor Author

teambvd commented Oct 4, 2020 via email

@AnalogJ
Copy link
Owner

AnalogJ commented Apr 25, 2021

I've since replaced Jobber with Cron. The crontab file is located at /etc/cron.d/scrutiny. However, it has some eccentricities unique to Scrutiny (/env.sh and STDOUT/STDERR redirects). Since cron/crontab does not support dynamic schedules, I think we would have to use something like confd to generate the config at runtime.

Though, now that I think about this further, we could use s6-overlay init functions for the omnibus image, and just a bash HEREDOC file for the collector-specific image.
hm.

AnalogJ added a commit that referenced this issue May 2, 2022
…g SCRUTINY_COLLECTOR_CRON_SCHEDULE env variable.

similar to linuxserver/docker-scrutiny#19

fixes linuxserver/docker-scrutiny#17
fixes #161
fixes #66
fixes #202
fixes #121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants