-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add ability to enable/disable pipelines #7989
Comments
this feature request aside, I must remind that multiple pipelines are compatible with the dynamic config reloading. so if logstash is started with |
So comment/uncomment one pipeline config in "pipelines.yml" would enable/disable a pipeline ? |
@fbaligand it will stop the pipeline and delete it internally, uncommenting will add and start it |
Ok thank you ! |
However, I maintain the feature request, because I'm very interested to be able to enable/disable (or start/stop) a pipeline using a script command. |
@jsvd it would be great if it was exposed as an api endpoint to stop pipelines. Otherwise its a CM tool exercise. The use case is more apparent when you're running a large pool of logstash hosts and want to temporarily disable a pipeline while doing other maintenance, or reduce the number of concurrent pipelines to reduce threads or pressure on ES. Making CM changes usually requires additional approval and if you're managing CM with a vcs, then it equates to a production code change. I concede this is a convenience feature. |
I would not concede this as a convenience feature - production systems (by best practice if not policy) would never a) change a configuration file on the fly or b) rename a file on a server to stop/start that service. Wholly un-scalable not to mention. So..bump? |
Sweet! I say usually to 'believe in the roadmap' and assume something like this is on the way (cuz why not). I'm not familiar, but enable/disable through Kibana, then through 6.6 ES APIs or such, is exactly what is requested, at issue. I was replying to the comment I guess, and these alternatives are what we will try using in the meantime. An API or feature on-the-way is enough for me (and customer)! 👌 Thanks for the quick reply @fbaligand! Is there a GH issue we can track and link here/close this issue perhaps? |
Sorry, I just removed my previous comment as it is totally out of context. And so, no, to my knowledge, there is no kibana or elasticsearch feature that allows to solve this issue. |
For us, Pipelines are proving useful for isolating logs based on certain conditions, performing actions and then outputting them in a certain way, while keeping an eye on the monitoring stats. A pipeline in the real world would have the ability to stop the flow upstream in order to carry out some maintenance. In Elasticsearch, when performing tasks like e.g. mapping updates, it's useful to stop ingestion long enough for the changes to be made, so new indices don't automatically get created. While we can fiddle with commenting out lines in YAML files, that feels inconsistent with the RESTful way of doing things that the Elastic stack is known for, and as mentioned above it doesn't scale. FWIW I have the same gripe with vanilla Logstash (i.e. the It's especially relevant now as we have a separate pipeline for migrating to ECS, and we don't want this to interfere with ingestion on the main pipeline |
+1000 for @rozling comment! |
I just came across this issue while trying to determine if this was possible. The use-case is running Logstash and associated configs in a docker container. The container could have up to 35 pipelines enabled. However not every instance of the container needs all of the pipelines (depending on the environment and scale requirements). If a config option such as
The
This would eliminate the need to produce a container for every possible combination of pipelines. |
my workaround was setting a directory structure with conf/pipelines.yml file
I know is dirty but works. Notes:
|
Hi, well, if you use a environment variable to define if a pipeline is enabled or disabled, this can’t be applied in a hot way, without restarting Logstash. Hot pipeline enable/disable is the feature that I expect in this issue. |
Here is possible solution to dynamically enable/disable any component of pipeline using build-in Ruby (and an extra pipeline with HTTP input which will act like REST API). In my case there is main pipeline 'beatsin' which receives events (from Filebeat or other). This pipeline constantly ships events to ES (http://es01:9200) and, optionally, can ship events to another consumer (ES http://es02:9200 for our case). There is another pipeline 'sandboxswitch' which listens to port 5081 and accept REST calls with JSON payload and a single field 'sandbox_enable' (supported values 0 and 1): To enable the optional pipeline:
To disable the optional pipeline:
Results of the latest call to 'sandboxswitch' is stored in '/usr/share/logstash/data folder to restore latest status after Logstash restart. pipelines.yml snippet:
Known limitation - if the optional pipeline is already blocked (ES http://es01:9200 is not available) - this solution won't unlock already blocked events, they will wait for http://es01:9200 is back to be shipped. |
This feature would be extremely valuable quality of life improvement, when working in a fortune 500 style enterprise environment, config changes are much more restricted than API calls. I concur with the proposed API, To enable the optional pipeline:
To disable the optional pipeline:
Disabling by this mechanism will mark pipeline as inactive, enabling will mark it as active again. Loading pipelines and enabling them should not exclusively combined, as they have different intentions which are just usually combined. |
In Logstash 6.0, we can add or remove pipelines.
It would be great to be able to disable a pipeline (without removing it and all its configuration), so that we can re-enable it later.
This is particularly useful for pipelines that we want to activate not always, but on demand for a limited time.
Obviously, this feature would be really great if it can be done using à rest API or something like that, so that it doesn't require a Logstash restart.
The text was updated successfully, but these errors were encountered: