I am a new user to graylog open. I wanted to setup graylog to read server logs but I believe some link is missing in the setup. If anyone can help me setup the missing link.
Steps I followed till now:
Installed elasticsearch as per installation instructions.
Installed mongodb
Installed graylog
Installed graylog-sidecar
Installed filebeat from elasticsearch
Configured filebeat config
Created token for sidecar via graylog web UI and configured it in sidecar configuration via command line
Added filebeat collector with sidecar via graylog web UI
Updated default filebeat output to point to elasticsearch ip/port
Added input via web ui at system > inputs.
After all this setup, all things are up and running but no logs/messages are seen.
Pls help me with the missing pieces to step.
OS Information:
My server is a centos based server.
PS: I am using tomcat for my application so the log I want to read are generated at /opt/tomcat/latest/logs/ folder which I have updated in the above config.
Just chiming in for sec, Graylog-sidecar is a wrapper for Winlogbeat, FileBeat, etc… you should not need to install FileBeat and the configurations for FileBeat would be done through the Web UI. Only thing you need to do is install graylog-sidecar , edit the sidecar.yaml file to connect to Graylog server and edit the FileBeat configuration on the Web UI.
Hi @gsmith
Initially, I did what you suggested.
I installed graylog-sidecar and tried configuring the sidecar and filebeat. But I could not find filebeat installed. And I came across few article/blog/SO which suggested to install filebeat expliciltly as filebeat is no longer bundled with sidecar. I felt weird but then I did what I found on those articles.
Nonetheless, what do you suggest should I do now? Bcs at this point, I am clueless on how to proceed further.
a) if your clients are UNIX/Linux systems, why don’t you simply use rsyslog? it works out of the box, it’s pretty straightforward to configure and you don’t need to fiddle around with cumbersome filebeat options…
b) do you have a Graylog server ingesting logs from external clients/remove systems? In this sense, can you please describe your setup?
The current scene is we are using tomcat based application server and we dont have any centralised logging system. We only log to local log files. So everytime a issue comes up, the team needs to access the log files to debug issues and the access to log files are with very limited stakeholders. So the larger actual usecase for setting up GrayLog is to ingest our tomcat based application logs to Graylog so that the developers and testers dont need to fiddle thru the log files to debug issues.
So this setup is a POC and I am trying to make this work using the systemsLog or any logs available on server.
Once this setup works, we will be then pushing our development and staging server logs to this particular instance (both servers are on different machines).
Once we are good with the dev and staging server logs, we will also start pushing prod logs.
So rsyslog is not our target.
The graylog-sidecar is currently trying to ingest logs from the same machine using filebeat. No other input or external system is configure yet to send data to this instance of graylog. Once this primary testing of ingesting local logs works, will start ingesting logs from external system.
I hope above points make it clear what we are trying to setup.
Hello @m_mlk
I tried the changes in the log path previous, and I re-tried updating the log paths after your reply but it still does not work.
My sidecar show the files correctly as it was showing previously by I dont find any messages in the main search screen.
I would look back over this documentation here. When your stuck or have issues its better to get advice here or support instead of a third party documentation.
Hi @gsmith
I have already referred to the documentation link you shared.
And the necessary changes are also done to the sidecar.yml file.
Required filebeat config is also configured as per the docs.
Token for sidecar config is also generated as per the steps mentioned in the docs.
Even after setting up all the config, and things didn’t worked, I had to referred to different blogs and third party articles.
On the dashboard you should be able to see the sidecar status Green/Running at this point, am I correct?
If this is correct then you should see the following.
I also see your using Localhost in the FileBeat configuration and using 127.0.0.1 in the sidecar configuration. You may want to adjust the FileBeat configurations to use the loopback address.
On Graylog Web UI you should have something like this.
[Message 1/2]
Hi @gsmith
All items suggested by you are working fine.
And I also updated the filebeat config with 127.0.0.1 instead of localhost as per suggestion.
Due to forum restrictions,
unable to attach multiple screenshots so attaching links to the same and spliting this message in 2 parts
Hi @Wine_Merchant
The default was config was for logstash but I haven’t setup logstash.
And either way, even with the default logstash config initially, it did not worked.
And then I felt it should be updated from logstash to ES so I updated it to ES.
So I need to setup logstash as well?
Haven’t come across any instruction to setup up logstash so no idea on that.
Perhaps I’ve misunderstood here but in the current setup of your filebeat you are attempting to send logs to 127.0.0.1 on port 9200. I can see you have an input listening on port 5044 on Graylog which I assume you want logs to arrive on, filebeat should be pointed at this port in order to deliver logs.
Hey @Wine_Merchant
I had previously tried to update the inputs with port no to 9200 but that input failed to start. Let me change the port in filebeat and check if that works.
Hey @Wine_Merchant
I tried by changing the filebeat config to push log to 5400 but still all systems are ups without any positive reslults.
And ideally, bcs the ES is running at 9200, i believe 9200 should be the actual value.