Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
1st - thank you for nice tutorial. Unfortunately, Nginx frontend doesn’t work for me:
Error: Bad Request at respond (http://x.x.x.x/index.js?_b=5930:81566:15) at checkRespForFailure (http://x.x.x.x/index.js?_b=5930:81534:7) at http://x.x.x.x/index.js?_b=5930:80203:7 at wrappedErrback (http://x.x.x.x/index.js?_b=5930:20882:78) at wrappedErrback (http://x.x.x.x/index.js?_b=5930:20882:78) at wrappedErrback (http://x.x.x.x/index.js?_b=5930:20882:78) at http://x.x.x.x/index.js?_b=5930:21015:76 at Scope.$eval (http://x.x.x.x/index.js?_b=5930:22002:28) at Scope.$digest (http://x.x.x.x/index.js?_b=5930:21814:31) at Scope.$apply (http://x.x.x.x/index.js?_b=5930:22106:24)
any idea? TIA, Vitaly
Great tutorial, thank you. I get an error on the kibana page prompting “Configure an index pattern” and iget stuck there it says "Unable to fetch mapping. Do you have indices matching the pattern? Any ideas? TIA
I used your previous tutorial and it worked nice. Thanks!!! Just one last little problem.
My Grok filter for LogStash:
filter {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
}
}
It is perfect for my Linux logins logs:
Mar 9 14:18:20 ServerName sshd[14160]: pam_unix(sshd:session): session opened for user root by (uid=0)
{
"message" => "Mar 9 14:18:20 ServerName sshd[14160]: pam_unix(sshd:session): session opened for user root by (uid=0)",
"@version" => "1",
"@timestamp" => "2015-03-09T15:08:39.189Z",
"host" => "elasticsearchservername",
"syslog_timestamp" => "Mar 9 14:18:20",
"syslog_hostname" => "ServerName",
"syslog_program" => "sshd",
"syslog_pid" => "14160",
"syslog_message" => "pam_unix(sshd:session): session opened for user root by (uid=0)"
}
The problem are the windows logs (little sintax differences), so I can’t get the syslog_pid:
Mar 3 08:58:57 ServerName2 Security-Auditing: 4624: AUDIT_SUCCESS Se inici.. sesi..n correctamente en una cuenta. Sujeto: Id. de seguridad:
{
"message" => "Mar 3 08:58:57 ServerName2 Security-Auditing: 4624: AUDIT_SUCCESS Se inici.. sesi..n correctamente en una cuenta. Sujeto: Id. de seguridad:",
"@version" => "1",
"@timestamp" => "2015-03-09T15:22:50.351Z",
"host" => "elasticsearchservername",
"syslog_timestamp" => "Mar 3 08:58:57",
"syslog_hostname" => "ServerName2 ",
"syslog_program" => "Security-Auditing",
"syslog_message" => "4624: AUDIT_SUCCESS Se inici.. sesi..n correctamente en una cuenta. Sujeto: Id. de seguridad:"
}
How can I change the grok filter for both logs (windows and linux) and get the two syslog_pid?
Thanks in advance and sorry for my English 0:-)
Thank you for these tutorials they are a life saver. Run into a bit of a snag with nginx. It states 502 Bad Gateway when trying to access Kibana. Direct access works fine so Kibana is okay. Nginx error log states the following:
2015/03/12 14:46:17 [crit] 8741#0: *1 connect() to 127.0.0.1:5601 failed (13: Permission denied) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: log.server.com, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:5601/”, host: “log.server.com”
2015/03/12 14:46:17 [error] 8741#0: *1 no live upstreams while connecting to upstream, client: xxx.xxx.xxx.xxx, server: log.server.com, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://localhost/favicon.ico”, host: “log.server.com”
What permission is denied?
Hi,
Thanks for your tutorial. Is there a way to setup a default page on kibana dahsboard, for example one of the dashboard I created as default page?
OK, I have finished. I configured the Windows Servers to send the logs to 5000 port, and the Linux to the 5001 port. My succesfully finish logstash.conf is:
input {
tcp {
port => 5000
type => windowslog
}
udp {
port => 5000
type => windowslog
}
tcp {
port => 5001
type => linuxlog
}
udp {
port => 5001
type => linuxlog
}
}
filter {
if [type] == "linuxlog" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
}
}
if [type] == "windowslog" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}?: %{POSINT:syslog_pid}?: %{GREEDYDATA:syslog_message}" }
}
}
}
output {
elasticsearch { host => localhost }
stdout { codec => rubydebug }
}
It works!!! I can see in my Kibana the logins/logouts… I am happy!!! Thanks for the help, Mitchell, great blog.
Hey Mitchell,
Thanks for another amazing post. Let me just say that your tutorials are of the best quality out there and are invaluable to those of us who read them.
I have one final problem Mitchell.
I don’t have the year in my incoming logs (so do you), so when I get the “syslog_timestamp” it is:
Mar 17 15:09:17 (like in your Kibana logs)
If I go to “Settings” in Kibana, it says that “syslog_timestamp” is a string field (not a date), so i can’t order by “syslog_timestamp”, only by @timestamp.
How can I resolve this? Adding the year to the “syslog_timestamp”? Changing the field type in ElasticSearch?
Thanks again in advance…
If you want to run logstash and listen on :5514 for incoming syslog messages and have rsyslog forward messages to you then you will either need to disable SELinux (setenforce 0; systemctl restart rsyslog) or you’ll need to extend your SELinux policy and include :5514 as a port rsyslog can connect to.
logstash can’t listen on :514 because it is a privileged port so it listens on :5514.
However, the SELinux for syslog forbids rsyslog from connecting to any port other than :514.
This bug/errata has more details: https://bugzilla.redhat.com/show_bug.cgi?id=728591
You’ll need to run the following command (as root) in order to permit rsyslog to connect to :5514 (logstash): semanage port -a -t syslogdportt -p tcp 5514
Thank you for the tutorial, I followed it up to installing nginx, I’m installing this on my webserver and want to use it to manage my logs including my apache logs, I don’t want to install nginx as well as the already present apache. Is there a way to continue the tutorial but using apache instead?