Skip to content
Snippets Groups Projects
Commit e7b18f20 authored by ale's avatar ale
Browse files

Rebase rsyslog-container changes

parent a1806012
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !110. Comments created here will be created in the context of that merge request.
---
- user:
name: "log-collector"
system: yes
home: "/var/log/remote"
groups: ["log-collector-credentials"]
# Example playbook using fail and when together
- fail:
msg: You cannot have enable_elasticsearch and enable_loki at the same time.
......@@ -19,14 +13,6 @@
- include_tasks: loki.yml
when: enable_loki
# Setup the rsyslog-collector instance. Needs packages from
# stretch-backports, to support modern versions of Elasticsearch.
- name: Install rsyslog-elasticsearch package from backports
apt:
name: rsyslog-elasticsearch
default_release: "{{ 'stretch-backports' if float_debian_dist == 'stretch' else '' }}"
state: present
- name: Create the rsyslog-collector logs dir
file:
path: "/var/log/remote"
......
......@@ -33,23 +33,7 @@ log-collector:
- job_name: rsyslog-collector
port: 9105
scheme: http
- job_name: elasticsearch
port: 9201
scheme: http
public_endpoints:
- name: logs
port: 5601
scheme: http
enable_sso_proxy: true
containers:
- name: kibana
image: registry.git.autistici.org/ai3/docker/kibana:master
port: 5061
volumes:
- /etc/kibana/kibana.yml: /etc/kibana/kibana.yml
- /var/lib/kibana: /var/lib/kibana
env:
BABEL_CACHE_PATH: "/var/lib/kibana/.babelcache.json"
- name: loki
image: grafana/loki:1.4.1
ports:
......@@ -59,8 +43,16 @@ log-collector:
- /etc/loki: /etc/loki
- /var/lib/loki: /var/lib/loki
#https://github.com/ricoberger/loki_exporter
systemd_services:
- rsyslog-collector.service
- name: rsyslog
image: registry.git.autistici.org/ai3/docker/rsyslog:master
ports:
- 6514
- 9105
volumes:
- /etc/rsyslog-collector.conf: /etc/rsyslog.conf
- /etc/rsyslog-collector-lognorm: /etc/rsyslog-collector-lognorm
- /var/spool/rsyslog-collector: /var/spool/rsyslog
- /var/log/remote: /var/log/remote
ports:
- 6514
- 3100
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment