337a9dbcf4
### Why I did it Currently there is only rsyslog plugin support for /var/log/syslog, meaning we do not detect events that occur in frr logs such as BGP Hold Timer Expiry that appears in frr/bgpd.log. ##### Work item tracking - Microsoft ADO **(number only)**: 13366345 #### How I did it Add omprog action to frr/bgpd.log and frr/zebra.log. Add appropriate regex for both events. #### How to verify it sonic-mgmt test case
18 lines
442 B
Django/Jinja
18 lines
442 B
Django/Jinja
## rsyslog-plugin for streaming telemetry via gnmi
|
|
|
|
|
|
|
|
template(name="prog_msg" type="list") {
|
|
property(name="msg")
|
|
constant(value="\n")
|
|
}
|
|
|
|
{% 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 %}
|