Logstash snmptrap

hi all:

    i want to use  logstash-snmptrap collect snmp message, i see the logstash'log no say any error, but elasticsearch-head no any index .
   i use   "snmptrap -v 2c -c public '' i 123456"  with another linux to send the command. no problem.
 i don't know how to write the .conf  for the snmp ? 
i check "/usr/share/logstash/bin/logstash -f snmp.conf -t"   is ok .

i don't know how to send to elasticsearch .

[root@elk-test conf.d]# /usr/share/logstash/bin/logstash -f system.conf -t
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2018-08-16 17:33:52.556 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
Configuration OK
[INFO ] 2018-08-16 17:33:59.665 [LogStash::Runner] runner - Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash

input {
snmptrap {
#id => "0001"
community => ["public"]
host => ""
port => 1602
type => "snmplog"
output {
elasticsearch {
hosts => [""]
index => "snmplog-%{+YYYY.MM.dd}"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.