diff --git a/provision-contest/ansible/roles/prometheus_target_all/files/71-push.conf b/provision-contest/ansible/roles/prometheus_target_all/files/71-push.conf new file mode 100644 index 00000000..ec38fdb5 --- /dev/null +++ b/provision-contest/ansible/roles/prometheus_target_all/files/71-push.conf @@ -0,0 +1 @@ +*.* @127.0.0.1:1514 diff --git a/provision-contest/ansible/roles/prometheus_target_all/handlers/main.yml b/provision-contest/ansible/roles/prometheus_target_all/handlers/main.yml index 87c6f70f..fa9d6a7d 100644 --- a/provision-contest/ansible/roles/prometheus_target_all/handlers/main.yml +++ b/provision-contest/ansible/roles/prometheus_target_all/handlers/main.yml @@ -1,4 +1,10 @@ --- +- name: Restart rsyslog + service: + name: rsyslog + enabled: true + state: restarted + - name: Restart promtail service: name: promtail diff --git a/provision-contest/ansible/roles/prometheus_target_all/tasks/main.yml b/provision-contest/ansible/roles/prometheus_target_all/tasks/main.yml index 4906c566..07661ce4 100644 --- a/provision-contest/ansible/roles/prometheus_target_all/tasks/main.yml +++ b/provision-contest/ansible/roles/prometheus_target_all/tasks/main.yml @@ -95,6 +95,15 @@ mode: 0644 notify: Restart promtail + - name: Setup promtail push + copy: + src: 71-push.conf + dest: /etc/rsyslog.d/ + mode: 0655 + owner: root + group: root + notify: Restart rsyslog + - name: Setup promtail systemd copy: src: promtail.service