Skip to content

Option to skip sample collection if file write time is too old #509

Open
@tt2468

Description

Description

I've searched as hard as I can and can't seem to find this functionality in nri-flex.

I have a file on disk which gets written to every 30 seconds. I would like to have nri-flex skip sampling from the file if it hasn't been modified within a configurable time. This is to prevent potentially inaccurate data from being sampled if, say, the program writing the file crashes.

Acceptance Criteria

Unknown

Describe Alternatives

In theory, I could use run: instead of file:, but that would mean I'm suddenly having to implement a bunch of handling that file: probably already takes care of. If I ping my program with HTTP and it has crashed, it obviously won't respond. But there's no reliable way to have such implicit behavior with writing files to disk outside of checking the last modified time.

Dependencies

Unknown

Additional context

None

Estimates

Unknown

Metadata

Assignees

No one assigned

    Labels

    feature requestCategorizes issue or PR as related to a new feature or enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions