Skip to content

Comments

Improve config file watcher resilience#148

Open
jaydenthorup wants to merge 1 commit intomrlhansen:masterfrom
jaydenthorup:master
Open

Improve config file watcher resilience#148
jaydenthorup wants to merge 1 commit intomrlhansen:masterfrom
jaydenthorup:master

Conversation

@jaydenthorup
Copy link

We now handle Rename events, retry watcher add up to 5 times, and reset retry count after 24 hours of no failures.

…atcher add up to 5 times, and reset retry count after 24 hours of no failures.
@mrlhansen
Copy link
Owner

I am trying to understand the use case here. You have a scenario where the config file is renamed, and a new file is then eventually renamed to the old name?

@jaydenthorup
Copy link
Author

jaydenthorup commented Nov 4, 2025

I have a script where the config file is updated every hour based on a nautobot database. The file refresh at times either didn't update or the watcher process crashed out in the middle of the write. Depending on what writer I use for the config, the change is also not caught by the watcher without the rename added.

@mrlhansen
Copy link
Owner

I will try to have a look, but this feels like a very hacky way of doing it.

@mrlhansen
Copy link
Owner

I have another suggestion. Would it be useful if the exporter had a /reload endpoint that could be called via a GET request and that would trigger the reload of the configuration file? If you can incorporate that in the workflow.

@mrlhansen
Copy link
Owner

I added the /reload endpoint in the new release: https://github.com/mrlhansen/idrac_exporter/releases/tag/v2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants