rsyslogの独自の「programname」属性と「syslogtag」属性から数値サフィックスを削除する方法

rsyslogの独自の「programname」属性と「syslogtag」属性から数値サフィックスを削除する方法

ローカルrsyslogのログを中央rsyslogに渡し、Elasticsearchに渡します。すべてがうまく機能しますが、errorrsyslog自体によって生成された重大度エントリには、またはprogramnameなどの属性があり、Elasticsearchの集計が中断されます。この図では情報が見つかりません。ランダムでもPIDでもありません。rsyslog-2222rsyslog-2039

rsyslogがこれを行う理由は何ですか?

この番号をrsyslogレベルから削除できますか?

ログの例:

2019-08-07T19:48:00+02:00 rsyslogd-2039 err     Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
2019-08-07T19:48:00+02:00 rsyslogd-2007 warning action 'action 10' suspended, next retry is Wed Aug  7 19:48:30 2019 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
2019-08-07T19:00:39+02:00 rsyslogd-2222 err     command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
2019-08-07T19:00:39+02:00 rsyslogd-2039 err     Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
2019-08-07T19:00:39+02:00 rsyslogd-2007 warning action 'action 10' suspended, next retry is Wed Aug  7 19:01:09 2019 [v8.16.0 try http://www.rsyslog.com/e/2007 ]

ベストアンサー1

属性はprogramname解析によって生成されますsyslogtag。非常に標準化されているようには見えませんsyslogtag。私の場合は、app-nameIETFドラフトDraft-ietf-syslog-protocolのフィールドであるpropを使用することをお勧めします。変更したばかり

property(name="programname")

そして

property(name="app-name")

これまでは、もはや奇妙なプログラム名はありません。

おすすめ記事