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

Implement prospector reloading #3362

Merged
merged 1 commit into from Jan 23, 2017
Merged

Commits on Jan 23, 2017

  1. Implement prospector reloading

    This PR allows to dynamically reload prospectors. It works the same way as module reloading in metricbeat.
    
    **Refactoring**
    
    * LoadStates was separated from NewProspector. The reason is that after New only the ID is needed and setting up states requires more calculations. So this can be done in a second step when all the validations are done.
    * Only allow to start a prospector when all states are set to Finished. If not, LoadStates returns an error. This is to prevent a prospector starting before a harvester finished with a file. The prospector will be picked up again during the next reloading phase.
    * Extract ReloadConfig to libbeat
    
    **Limitations**
    
    This implementation currently has the some limitations. This are not new in filebeat but require more care as configurations change more often.
    
    * Two prospectors on one file: It is possible, that two prospectors pick up one file because they defined overlapping patterns. This can have the consequence that two harvesters on the same file are running which can lead to duplicates and unpredictable behaviour. The risk is minimized in that a prospector does not start as long as a state it takes care of is not finished. But it can still happen that a Finished state is picked up but it also managed by an other prospector. The user must ensure no prospector paths overlap. This problem can potentially be solved in the future with a global harvester registry.
    
    **Notes**
    
    * In a later PR, more refactoring and unification of the reloading should happen.
    ruflin committed Jan 23, 2017
    Configuration menu
    Copy the full SHA
    88a0ff1 View commit details
    Browse the repository at this point in the history