-
Notifications
You must be signed in to change notification settings - Fork 908
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
configuring filebeat with elk-docker image #70
Comments
I'm unfamiliar with Mesosphere in particular but generally speaking the feature you're looking for is service discovery (https://docs.mesosphere.com/1.8/usage/service-discovery/mesos-dns/). Hope this points you in the right direction, otherwise you may want to check in with the Mesosphere community who will most certainly be able to help you with this one. |
Thank you so much for your response and certainly it helps me a lot. I think, I should talk to Mesosphere team and find out how DNS name get assigned when Marathon creates a ELK container. I don't see any option where I can provide DNS while containerizing an ELK in Mesosphere. |
Finally with the help of Mesosphere team, I am able to find out how Mesosphere discovery service works and update the logstash and filebeat configuration files. But now getting unauthorized error when tried to deploy the elk docker image through Marathon. I run the same docker image with docker command (sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -p 5000:5000 -it elk ) without any issue. I am wondering without using -v option (volume) in docker run command, how all the configuration files get available in container? Based on my understanding, to have all configurations file in container, have to create volume and thinking the unauthorized error which I am getting on Marathon due to cert. |
This section of the documentation explains how to use your own configuration files: http://elk-docker.readthedocs.io/#updating-logstash-configuration |
Thank you so much for quick reply. |
And other thing, I noticed that in docker files, you have added elasticsearch , logstash and Kibana group. Do I need to make any changes on that as I am trying to run under my user? |
Sorry I'm not sure I understand the question. If you've simply extended the image or bind-mounted your additional config files then the non-overwritten ones (including the
In general, that shouldn't be necessary. These are the users that the various services are running as within the running container, but they're unrelated to the user you're starting the container with (if I understand your question correctly). If the above doesn't help, could you check that you can run a (default, then extended as per your needs) ELK container and feed it some logs using Filebeat on a vanilla Linux? |
Thank you so much for your response . Your suggestion and clarification are helping me a lot. Based on your suggestion, first tried to run default elk image without Mesohphere and got running then extended custom configurations (30-output.conf and gork-pattern.conf) and got running too on a vanilla Linux. Once extended image worked on a vanilla box, I tried on Meshosphere and guess what , deployed successfully without any issue (great relief LOL). I don't know what was doing wrong earlier but this time elk container has deployed and started successfully in Meso. After pushing some logs, tried to access the Kibana (http://localhost:5601) but got not found error. |
Great to hear that part of the set-up is now working with Meso! As far as accessing Kibana is concerned: is your Meso hosted locally? If not you'll need to access it using the proper IP or DNS name rather than |
I always appreciate your help. Based on my understanding, if we have mentioned the EXPOSE command in docker file, container should pick form there. Do we need to set some flag in docker file to automatically map the port in container as I don't find any option in Meso where I can map. I will try to reach out to Meso team to figure out this option in Meso. Can you please point out the document where it has mentioned? |
Oops, my mistake, I meant 'publish(ed)', not 'expose(d)' (you're right the port is already In Meso my best guess is that the answer is somewhere on this page, but as always the Meso team will be able to help you out as I've never used Meso myself. |
Thank you. Still struggling and working with Mesosphere team to find out the equivalent config as of docker -p. But in mean while I am trying to test every thing in vanilla Linux (so manually running docker image on few machines in cluster). After manually pushing some data in elasticsearch, tried to visualize the kibana but didn't get through. After going through the kibana logs, I found following log:{"type":"log","@timestamp":"2016-10-05T17:22:52Z","tags":["warning","elasticsearch"],"pid":230,"message":"Unable to revive connection: http://localhost:9200/"} |
Very strange indeed… the default image on a vanilla Linux should work out of the box. From what I read, the You may want also to check out https://discuss.elastic.co/c/elasticsearch (for instance the very recently opened post here: https://discuss.elastic.co/t/unable-to-revive-connection-errors-when-running-es-in-docker-container/62374) for suggestions. |
With the help of Mesosphere team, I am able to resolve above issues and finally, ELK server is up and running in Mesosphere . So I moved one step further but not yet done as I don't see the logs in Kibana. It seems like filebeat is not shipping logs to logstash. See the docker logs of filebeat container below. 2016/10/13 19:56:40.483005 geolite.go:24: INFO GeoIP disabled: No paths were set under output.geoip.paths |
Glad to hear that things are starting to work! As far as certificates are concerned, I suppose you've already read this part of the documentation.
And that should be it! |
thanks for reply. One quick clarification: do I need to overwrite logstash-forwarder.key and logstash-forwarder.cert or logstash-beats.key and logstash-beats.crt one? I am using filebeat as shipper. |
You only need to overwrite the |
Hi
|
Sure thing, this image is just a way to package the ELK stack, so anything that can be done with the ELK services can be done with the image. |
Thank you as always. so after tweaking the image, tried to run my elk-kafka image but I got follwoing error from logstash.log here is my kafka-input config: Tweak docker file Something I am not doing right. any help |
I forgot to mention that I have installed kafka-input plugin from here |
Unfortunately I can't help you with the actual usage of the ELK stack (I'm only "responsible" for packaging the image), so I'm going to redirect you to https://discuss.elastic.co/ for guidance on how to configure ELK and the components surrounding it (including plugins). |
Hi, |
From a Docker perspective, simply pull the |
If I am correct, in docker file, you have mentioned the version which is hard coded like in case of logstash it is 2.4. I am trying to understand how it will pull latest. Sent from my iPhone
|
The |
thank you as always. Just one quick question.If I create my own image based on yours (FROM sebp/elk), does it pull the latest from master branch? |
Yes by default it extends the |
With your help, my complete elk stack with pipeline filebeat->logstash->elasticsearch->kibana is up and running in Mesosphere and thank you so much for that. Now I am trying with different pipeline filebeat->Kafka->logstash->elasticsearch->kibana and that's where I am using elk 5.0.0 version. [2016-11-03T14:39:26,640][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["elk.marathon.mesos:9200"]} and also there is some error with logrotate: Caused by: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@2c2252c8] unable to create manager fo |
Great to hear that things are or have been working! Regarding the error with Logstash, my first guess is that it's not related to the image, might be a breaking change in v5.0.0 so best head over to https://discuss.elastic.co/ for guidance. As far as log rotation is concerned, I'll have to give it a closer look (FYI there's an open issue – namely #63 – regarding logrotate and Logstash, which is possibly not specific to the image; might be related to what you're seeing). |
I thought so. I have already posted my issue on elastic forum. 2016-11-03 14:39:26,121 main ERROR Unable to create file /var/log/logstash/logstash.log/logstash-plain.log java.io.IOException: Not a directory 2016-11-03 14:39:26,124 main ERROR Unable to invoke factory method in class class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile. java.lang.reflect.Invoc |
OK, now I see it, it's an issue with the image: Logstash's (Tracking this specific issue in #81) |
Can you please inform me once you make that changes. I am assuming this error has nothing do with connection issue? |
Please use GitHub's subscribe button on #81 to be kept informed when the change is made. |
And your assumption is right, this is unrelated to the connection issue. |
For some reason it appears that enabling the I've done a couple of other updates and can confirm that everything is working end to end, from Filebeat to Kibana. The updated image is currently being built (will be a few minutes): could you give it a shot once it's ready? |
You are the best and Thant you so much for helping me out. I would love to try. Please let me know once you checked in. I think I will get an email as have already subscribed this Sent from my iPhone
|
Thanks for the kind words! |
Somehow it's not pulling the elk5.0.0. because now I am getting some kafka setting error which was working before es500_l500_k500 tag. Here is my Dockerfile: |
Can't help you there I'm afraid. Just tried using the image (both with the |
So es500_l500_k500 tag has latest code too? On Sat, Nov 5, 2016 at 12:52 AM, Sébastien Pujadas <[email protected]
|
|
Closing this issue (the original problem was solved). |
Hi
After some struggle and hurdle, I have successfully developed come data pipe line for logging (filebeat-Kafka-elk). I would like to thank you for your help and guidance.
I have one general question which is not related to elk. Do you have any knowledge of using Kafka broker behind software load balance like HAProxy? I have have Kafka cluster comprises 6 Kafka broker but want to configure my Kafka consumer through HAProxy? Any guidance in this regard?
Thank you
Rai
…Sent from my iPhone
On Nov 17, 2016, at 3:11 PM, Sébastien Pujadas ***@***.***> wrote:
Closing this issue (the original problem was solved).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Nice to hear that you got everything working. Any specific tips you'd like to share that may be useful to others attempting to do the same? As far as load balancing is concerned, my (very limited) understanding of Kafka is that it natively took care of load balancing requests from producers and consumers to brokers, so using an external load balancer would be at best redundant and at worst inefficient. But I could be terribly wrong so I'd strongly recommend approaching someone that is actually knowledgeable about Kafka for guidance. |
Hi there
As it has been log time so thought to bug and have your knowledge . I am trying to use Solr_http out plugin for logstash. Can I use your elk docker image with modification for Solr? Do you have any image for this?
Thanks
Manoj
…Sent from my iPhone
On Jan 7, 2017, at 5:29 AM, Sébastien Pujadas ***@***.***> wrote:
Nice to hear that you got everything working. Any specific tips you'd like to share that may be useful to others attempting to do the same?
As far as load balancing is concerned, my (very limited) understanding of Kafka is that it natively took care of load balancing requests from producers and consumers to brokers, so using an external load balancer would be at best redundant and at worst inefficient. But I could be terribly wrong so I'd strongly recommend approaching someone that is actually knowledgeable about Kafka for guidance.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No I haven't got an image for your use case: I only maintain this baseline image, and it's up to the users to extend it as needed. |
Firstly, I would like to let you know that this is not an issue with your elk-docker image but it's problem which I am facing while trying to use filebeat docker image. I created a docker container of elk based on image and ran successfully. I built a separate image for filebeat and deployed on separate machine other then elk server. I am struggling to figure out what should I put under logstash output host field in filebeat configuration file as elk images is deployed by mesosphere and don't know the ip address.
The text was updated successfully, but these errors were encountered: