omgelf is deprecated
This commit is contained in:
@@ -4,14 +4,6 @@
|
|||||||
name: rsyslog-gnutls # For TLS support
|
name: rsyslog-gnutls # For TLS support
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Bastionhost | rsyslog forwarding | Ensure rsyslog GELF module is installed (on RedHat family)
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: rsyslog-gelf # For Graylog Extended Log Format (GELF)
|
|
||||||
state: present
|
|
||||||
when:
|
|
||||||
- log_forwarding_type == 'gelf'
|
|
||||||
- ansible_os_family == "RedHat"
|
|
||||||
|
|
||||||
- name: Bastionhost | rsyslog forwarding | Configure GELF forwarding for SSH logs (for Graylog)
|
- name: Bastionhost | rsyslog forwarding | Configure GELF forwarding for SSH logs (for Graylog)
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/rsyslog.d/60-forward-ssh-logs.conf
|
dest: /etc/rsyslog.d/60-forward-ssh-logs.conf
|
||||||
@@ -20,8 +12,7 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
content: |
|
content: |
|
||||||
# This file is managed by Ansible
|
# This file is managed by Ansible
|
||||||
# Forward sshd logs to a remote Graylog server using GELF over TLS
|
# Forward sshd logs to a remote Graylog server using GELF (via omfwd) over TLS
|
||||||
module(load="omgelf")
|
|
||||||
template(name="gelf" type="list") {
|
template(name="gelf" type="list") {
|
||||||
constant(value="{\"version\": \"1.1\", \"host\": \"")
|
constant(value="{\"version\": \"1.1\", \"host\": \"")
|
||||||
property(name="hostname")
|
property(name="hostname")
|
||||||
@@ -40,7 +31,7 @@
|
|||||||
|
|
||||||
# Filter for sshd messages and apply the action
|
# Filter for sshd messages and apply the action
|
||||||
if $programname == 'sshd' then {
|
if $programname == 'sshd' then {
|
||||||
action(type="omgelf"
|
action(type="omfwd"
|
||||||
target="{{ log_forwarding_target }}"
|
target="{{ log_forwarding_target }}"
|
||||||
port="{{ log_forwarding_port | default(12201) }}"
|
port="{{ log_forwarding_port | default(12201) }}"
|
||||||
protocol="tcp"
|
protocol="tcp"
|
||||||
|
|||||||
Reference in New Issue
Block a user