sonic-buildimage/files/build_templates/rsyslog_plugin.conf.j2
Zain Budhwani 6a54bc439a
Streaming structured events implementation (#11848)
With this PR in, you flap BGP and use events_tool to see the published events.
With telemetry PR #111 in and corresponding submodule update done in buildimage, one could run gnmi_cli to capture BGP flap events.
2022-09-03 07:33:25 -07:00

20 lines
475 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/share/sonic/scripts/rsyslog_plugin -r /etc/rsyslog.d/{{ proc.parse_json }} -m {{ yang_module }}"
output="/var/log/rsyslog_plugin.log"
template="prog_msg")
}
{% endfor %}