This shows you the differences between two versions of the page.
syslogngek [2015/10/21 16:26] ian [Syslog-ng] |
syslogngek [2020/02/13 22:55] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Syslog-ng / Elasticsearch / Kibana ====== | ||
- | |||
- | Elasticsearch is used index and make all logs searchable. | ||
- | |||
- | Kibana provides a web interface to the search and configure visualization. | ||
- | |||
- | Syslog-ng can send logs directly to elasticsearch, | ||
- | |||
- | < | ||
- | I am using Ubuntu 14.04 LTS Server. | ||
- | </ | ||
- | |||
- | ====== Installation ====== | ||
- | |||
- | ===== Syslog-ng ===== | ||
- | |||
- | Install syslog-ng, this will replace the current rsyslog. | ||
- | |||
- | < | ||
- | :~# aptitude install syslog-ng | ||
- | </ | ||
- | |||
- | <note tip> | ||
- | Syslog-ng 3.7 can run elasticsearch directly, because the version in Ubuntu 14.04 is 3.5 we use a glue module. | ||
- | </ | ||
- | |||
- | Puppet Manifest: https:// | ||
- | |||
- | < | ||
- | puppet apply / | ||
- | </ | ||
- | |||
- | ===== ElasticSearch / Kibana ===== | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | Code: https:// | ||
- | |||
- | ====== Configuration ====== | ||
- | |||
- | ===== Syslog-ng ===== | ||
- | |||
- | **/ | ||
- | < | ||
- | @include " | ||
- | |||
- | destination d_elastic { | ||
- | | ||
- | | ||
- | ); | ||
- | }; | ||
- | |||
- | log { | ||
- | source(s_src); | ||
- | destination(d_elastic); | ||
- | flags(flow-control); | ||
- | }; | ||
- | </ | ||
- | |||
- | < | ||
- | :~# service syslog-ng reload | ||
- | * Reload system logging syslog-ng | ||
- | </ | ||
- | |||
- | |||
- | ===== Kibana ===== | ||
- | |||
- | Visit your kibana URL http:// | ||
- | |||
- | Set your index pattern to syslog-ng to match the index() of syslog-ng. | ||
- | |||
- | Start by clicking on the // | ||