sonic-buildimage/files/build_templates/rsyslog_plugin.conf.j2
Zain Budhwani fd6a1b0ce2
Add events to host and create rsyslog_plugin deb pkg (#12059)
Why I did it

Create rsyslog plugin deb for other containers/host to install
Add events for bgp and host events
2022-09-21 09:20:53 -07:00

20 lines
459 B
Django/Jinja

## rsyslog-plugin for streaming telemetry via gnmi
template(name="prog_msg" type="list") {
property(name="msg")
constant(value="\n")
}
$ModLoad omprog
{% for proc in proclist %}
if re_match($programname, "{{ proc.name }}") then {
action(type="omprog"
binary="/usr/bin/rsyslog_plugin -r /etc/rsyslog.d/{{ proc.parse_json }} -m {{ yang_module }}"
output="/var/log/rsyslog_plugin.log"
template="prog_msg")
}
{% endfor %}