gpt4 book ai didi

postgresql - Nxlog im_dbi 不工作

转载 作者:行者123 更新时间:2023-11-29 13:02:08 33 4
gpt4 key购买 nike

我可以使用 nxlog(om_dbi) 将数据插入 PostgreSQL。

但我无法使用 nxlog 从 PostgreSQL 选择数据(或获取数据)。我尝试了很多选项都没有用。

而在 nxlog 文档中,对于 IM_DBI 模块的描述也只提到了“FIXME”。

文档链接:http://nxlog.org/documentation/nxlog-community-edition-reference-manual-v20928#im_dbi

请帮我解决这个问题。

日志:

<Input dbiin>
Module im_dbi
SavePos TRUE
SQL SELECT * FROM NEW_TABLE
Driver pgsql
Option host 127.0.0.1
Option username chitta
Option password ''
Option dbname db
</Input>

2014-10-16 14:29:17 WARNING nxlog-ce received a termination request signal, exiting...
2014-10-16 14:29:18 INFO nxlog-ce-2.8.1248 started
2014-10-16 14:29:18 ERROR im_dbi failed to execute SQL statement. ERROR: column "id" does not exist;LINE 1: SELECT * FROM NEW_TABLE WHERE id = 1;

Note:
the module will automatically prepends a "WHERE id > %d" clause.

最佳答案

不是答案,但这里有一些帮助。

The most important directive is missing: SQL Select ID as id, DateOccured as EventTime, data from logtable

来源:https://www.mail-archive.com/nxlog-ce-users@lists.sourceforge.net/msg00225.html

我目前在同一条船上。我的假设是您的数据没有以 nxlog 可以解释的方式格式化。故障排除,如果我能找到解决方案,我会尽快回复您。

同时挖掘 im_dbi 模块的源代码。

https://github.com/lamby/pkg-nxlog-ce/blob/master/src/modules/input/dbi/im_dbi.c

关于postgresql - Nxlog im_dbi 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26519844/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com