是否有用于自定义/内部用途的Syslog私人企业号码?
因此,我最近正在寻找一种在原木中添加额外的元数据的方法,并发现Syslog让我受到了覆盖。我可以使用这样的SD-ID功能添加自定义元数据:
[meta@1234 project="project-name" version="1.0.0-RC5" environment="staging" user="[email protected]"]
问题是1234
必须是syslog private Enterprise编号
。 我认为这些是给微软或苹果等大公司,但不是给独立开发人员。 因此,我的问题是,是否有一个保留数字用于内部用途,每个人都可以在没有注册的情况下使用内部用途?
So I recently was looking for a way to add extra metadata to logs and found out that syslog got me covered. I can add custom metadata using SD-ID feature like this:
[meta@1234 project="project-name" version="1.0.0-RC5" environment="staging" user="[email protected]"]
The problem is that 1234
has to be a syslog private enterprise number
.
I assume those are given to big companies like microsoft or apple, but not to indie developers.
So My question is, is there a reserved number for internal use that everyone could use without registration for internal purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用
RFC5424
- 构造消息,则可以(或可以)在sdata
(结构化数据)一部分中创建自定义字段。正如您提到的,
sdata
中自定义字段的后半部分是私有企业号(或enterpiseid)。按 rfc5424 定义:
当然,这取决于您正在使用的方法,如果仅适用于本地日志,则可以使用任何企业家,甚至可以使用带有保留的SD-ID的预定义的SDATA字段并重写其值。 (请参阅: syslog-ng指南)
If you use
RFC5424
-formatted messages, you can (or could) create custom fields in theSDATA
(Structured Data) part of the message.The latter part of a custom field in the
SDATA
is, as you mentioned, the private enterprise number (or enterpiseId).As per RFC5424 defined:
Of course it depends on what you're using it for, if it's only for local logs, you can use any enterpriseId or you can even use a predefined SDATA field with a reserved SD-ID and rewrite it's value. (See: syslog-ng Guide)