fd6a1b0ce2
Why I did it Create rsyslog plugin deb for other containers/host to install Add events for bgp and host events
20 lines
459 B
Django/Jinja
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 %}
|