Team,
I installed Logstash 7.1.0 on Ubuntu 18.04. I am not entirely sure on how the pipelines work when Logstash is installed as a service. I can run the pipeline in the foreground, however, that's not good enough for Production.
I created a basic pipeline that takes data from a file and loads it to Elasticsearch. I can execute this pipeline easily using
/usr/share/logstash/> bin/logstash -f myfile.conf
All this while my logstash service is shutdown in the background so I can manually run the above command. The pipeline works fine and now I want to take this to Production.
I added the pipeline to /etc/logstash/conf.d/myfile.conf and restarted my logstash service. However, I do not see anything happening. Shouldn't logstash service on startup look at the files in the /etc/logstash/conf.d/ directory and execute all pipelines there? Is my understanding correct?
Thanks
Nick
You should update the /usr/share/logstash/config/pipelines.yml file to include your pipeline file, for example:
# This file is where you define your pipelines. You can define multiple.
# For more information on multiple pipelines, see the documentation:
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
- pipeline.id: syslog
path.config: "/usr/share/logstash/pipelines/syslog.conf"
- pipeline.id: nginx-access
path.config: "/usr/share/logstash/pipelines/nginx-access.conf"
So it will run the pipelines once service start running.
See https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
Related
I have logstash configuration and running well when I running this on terminal
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/receiver.conf --path.settings /etc/logstash
The problem is, I want to logstash running on background as a service. But its not work when I tried to running with
systemctl start logstash
This is configuration on my /etc/logstash/logstash.yml
path.data: /var/lib/test
path.config: /etc/logstash/conf.d/receiver.conf
path.logs: /var/log/logstash
This is configuration on my /etc/logstash/pipeline.yml
- pipeline.id: main
path.config: "/etc/logstash/conf.d/*.conf"
I'm using Linux 10 to running this logstash. Is there any changes I have to do with the services or I missing something?
Gitlab:14.4.0
Gitlab-Runner:14.4.0 & 13.0.1
After I upgrade Gitlab from 13.6.3 to 14.4.0, all Runner could not pick up jobs
I thought it was Runner version too old,but Gitlab-Runner:14.4.0 on other Linux vm show the same problem
gitlab-runner status looks normal
But when I use gitlab-runner --debug run on each vm, Runner work for few minutes, the runner on that vm could pick up jobs, now I run this command manual every 5 minute to keep other developer working
the problem is we deploy gitlab use docker version image on hand wirte Deployment deploy on Kubernetes, the background jobs fail and stuck many times, after we transfer data to new Gitlb which deploy by helm problem solved
I had the same problem. But I figured it came from the GitLab instance iteself.
The problem was thensolved by upgrading to 14.4.2. I don't think it's the update itself, but the restart of the GitLab instance after the upgrade proved useful.
Ran into a similar issue (GitLab EE v14.2.3-ee) whereby all 3 runners where in a wait state for minutes at a time, before any pending jobs were eventually picked up. Resolved the issue by...
removing all runners,
resetting the config.toml file (which was cluttered with [[runner]] entries from former runners),
restarting GitLab, and
then creating new runners.
Specifically, I performed the following steps...
Delete all runners via "GitLab console > Admin > Overview > Runners".
Log into runner host(s), find config.toml, and clean out the entire file except for...
concurrent=5
check_interval=0
[session_server]
session_timeout = 1800
Log into GitLab EE host and restart GitLab EE.
sudo gitlab-ctl restart
Log into the runner host(s), and create new runners (follow directions from "GitLab console > Admin > Overview > Runners" )
After the above corrective action, the runners now immediately pick up pending jobs.
This is my workflow filebeat -> logstash -> elasticsearch -> kibana
logstash 7.8.1
Ubuntu 18.04 64 bit
My logstash keeps getting shutdown unexpectedly after running successfully for sometime with below error
i'm not able to identify the reason for this error to look for solutions.
i had to restart logstash to load the data into elasticsearch whenever it gets shutdown.
Any suggestions are appreciated
it has been a while since i posted this question. i have figured out a solution for this problem, click this link to view the solution i posted in github issues.
Reposting same answer below
i moved from logstash barebone software installation to docker image.
As i expected, the docker container keeps running in the background without the issues that i have mentioned in my question. The container should be running in detached mode.
Below is the command that is used to run the logstash in docker container mode
docker run -d -p 9600:9600 -p 5044:5044 -v /home/elkuser/elkstack/softwares/logstash_file_docker/logstash.yml:/usr/share/logstash/config/logstash.yml -v /home/elkuser/elkstack/softwares/logstash_file_docker/pipeline-final.conf:/usr/share/logstash/pipeline/logstash.conf cc67e625d974
Logstash docker image that is used docker pull docker.elastic.co/logstash/logstash:7.8.1
References
https://docs.docker.com/engine/install/ubuntu/
https://www.docker.elastic.co/r/logstash/logstash:7.8.1
When I git push I have to go to the server the gitlab-runner is configured on and enter in the terminal "sudo gitlab-runner run" or "gitlab-runner run". and then the pipeline would start. And I have to be in the runtime-platform all the time. This defeats the point of a pipeline.
It used to work so that when I git pushed, the pipeline would start automatically, I didn't have to enter the command at all. So is there a way to set that up?
There are the following two methods to achieve that.
nohup gitlab-runner run & will keep your runner running as a user process and uses a config file that defaults to /home/<user>/.gitlab-runner/config.toml (see man nohup)
sudo systemctl start gitlab-runner will start as a service, and uses a config file that defaults to /etc/gitlab-runner/config.toml (see man systemctl)
In both cases, you will be able to logout and the runner will stay active.
The gitlab documentation is pretty clear :
GitLab offers a continuous integration service. For each commit or push to trigger your CI pipeline, you must:
Add a .gitlab-ci.yml file to your repository’s root directory.
Ensure your project is configured to use a Runner.
.gitlab-ci.yml part
You need to create a file named .gitlab-ci.yml in the root directory of your repository. The script part depends of what you want to do in the job.
Runner part
You need to install and configure the runner.
The most simple is to use shared runner
I am launching a new instance through AWS and I am using Puppet as the configuration management tool. I am using ELK Stack for the analytic purposes. So I am configuring Puppet in such a way that whenever I'm launching a new server, it will automatically install Logstash. So everything is setup properly now, I can see the Logstash service running, but the problem is that the logs are not getting shipped to ElasticSearch.
And there is more to it.
If I run the following command manually, I can see the logs getting shipped to elasticsearch.
/opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf