我用了#34; fluent-plugin-snmp"和" fluent-plugin-mysql"想获取snmp信息并保存在MySQL中。
但我无法将SNMP信息保存到MySQL
我的配置代码是
<source>
type snmp
tag snmpser1
nodes name, value
host localhost
community public
mib sysDescr.0, sysName.0
method_type get
polling_time 10
polling_type async_run
</source>
<match snmpser*>
@type mysql_bulk
host localhost
database test01
username root
password password
column_names name,value
key_names data01,data02
table new_table
flush_interval 10s
</match>
但它无法保存在mysql中。
错误信息
2017-09-08 14:05:53 -0700 [info]: #0 bulk insert values size (table: new_table) => 2
2017-09-08 14:05:53 -0700 [warn]: #0 failed to flush the buffer. retry_time=1 next_retry_seconds=2017-09-08 14:05:53 -0700 chunk="558b3f08bf79121a7b4d669b30703220" error_class=Mysql2::Error error="Unknown column 'name' in 'field list'"
2017-09-08 14:05:53 -0700 [warn]: #0 suppressed same stacktrace
2017-09-08 14:05:55 -0700 [info]: #0 bulk insert values size (table: new_table) => 2
2017-09-08 14:05:55 -0700 [warn]: #0 failed to flush the buffer. retry_time=2 next_retry_seconds=2017-09-08 14:05:55 -0700 chunk="558b3f08bf79121a7b4d669b30703220" error_class=Mysql2::Error error="Unknown column 'name' in 'field list'"
所以...我该怎么办?