如何在 GrayLog2 API 响应中获取消息 ID(哈希)?
How get message ID (hash) in GrayLog2 API response?
我使用 Graylog2 API 从 Graylog2 服务器获取消息。如果我能得到 gl2 消息 ID,那将对我很有帮助。 GrayLog 没有任何类似于 SQL 中自动递增的机制,但哈希的 ID 值对于消息始终相同且唯一。
不幸的是,默认情况下,该值不存在于消息的响应数据中。
我的连接器是用 Python 编写的,并使用请求库进行 HTTP 连接。
如何使用 Graylog2 获取消息 ID API?
http://<GL2_Server_IP>:12900/search/universal/absolute?query=_exists_%3AFoobar+AND+_exists_%3AFoobar2&from=2016-04-29%2003%3A43%3A49.461&to=2016-05-31%2015%3A43%3A49.461&filter=streams%<Stream_ID>&fields=Foobar%2C%20Foobar2
我在 GrayLog 2 的 google 组中得到了答案。也许这会对某些人有所帮助。
https://groups.google.com/forum/?hl=en#!topic/graylog2/Ab5RkDmAUyc
我使用 Graylog2 API 从 Graylog2 服务器获取消息。如果我能得到 gl2 消息 ID,那将对我很有帮助。 GrayLog 没有任何类似于 SQL 中自动递增的机制,但哈希的 ID 值对于消息始终相同且唯一。
不幸的是,默认情况下,该值不存在于消息的响应数据中。
我的连接器是用 Python 编写的,并使用请求库进行 HTTP 连接。
如何使用 Graylog2 获取消息 ID API?
http://<GL2_Server_IP>:12900/search/universal/absolute?query=_exists_%3AFoobar+AND+_exists_%3AFoobar2&from=2016-04-29%2003%3A43%3A49.461&to=2016-05-31%2015%3A43%3A49.461&filter=streams%<Stream_ID>&fields=Foobar%2C%20Foobar2
我在 GrayLog 2 的 google 组中得到了答案。也许这会对某些人有所帮助。
https://groups.google.com/forum/?hl=en#!topic/graylog2/Ab5RkDmAUyc