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

metric collection between times #6897

Closed
SimonMcN opened this issue Jan 14, 2020 · 2 comments
Closed

metric collection between times #6897

SimonMcN opened this issue Jan 14, 2020 · 2 comments
Labels
area/agent feature request Requests for new plugin and for new features to existing plugins

Comments

@SimonMcN
Copy link

SimonMcN commented Jan 14, 2020

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

It would be nice to be able to specify that an input metric should only operate between certain hours or days or combination of the two (ie trading hours).

Current behavior:

Does not exist

Desired behavior:

some form of Cron type expression to define start time, end time, and perhaps interval if this is not consistent with existing formatting as an override behaviour ?
ie
cron = */15 07-19 * * * /path/script

Use case:

eg, collecting stats on metrics that have relevance during trading hours, but outside trading hours you don't want the processor load, or the probability that files could get locked by scripts and not be rotated.

@danielnelson danielnelson added area/agent feature request Requests for new plugin and for new features to existing plugins labels Jan 14, 2020
@Hipska
Copy link
Contributor

Hipska commented Feb 1, 2022

Best solution for this would be to schedule telegraf runs for these inputs by using cron: */15 07-19 * * * /bin/telegraf --once --config /etc/telegraf/trading_hours.conf

Something that might be relevant for this as well is #10545.

@powersj
Copy link
Contributor

powersj commented Aug 16, 2022

I'm going to close as 1) cron would be good for this and 2) the collection offset may also aid here.

Thanks!

@powersj powersj closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

3 participants