2022-09-03 09:33:25 -05:00
|
|
|
## 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"
|
2022-09-21 11:20:53 -05:00
|
|
|
binary="/usr/bin/rsyslog_plugin -r /etc/rsyslog.d/{{ proc.parse_json }} -m {{ yang_module }}"
|
2022-09-03 09:33:25 -05:00
|
|
|
output="/var/log/rsyslog_plugin.log"
|
|
|
|
template="prog_msg")
|
|
|
|
}
|
|
|
|
{% endfor %}
|