Step 1 - Installing Logstash

Follow this article to setup Logstash on the designated server.
Next, open the configuration file (logstash.conf) and add another input  clause, as follows:

SNMP Polling

Add an snmp input. For example:

input {
  snmp {
    get => ["", "", ""]
    hosts => [{host => "udp:" community => "public"}]

The input plugin is highly configurable. Refer to the plugin documentation for more configuration options.

SNMP Traps

Add an snmptrap input. For example:

snmptrap {
  port => 1062

This plugin can handle SNMPv1, SNMPv2c and Informs (SNMPv3).

Note - if you use custom MIBs in your environment, you will have to import them to Logstash. See the official documentation on how to do this for polling and traps.

That's it. Restart Logstash to start seeing events showing up in Sophie.

Did this answer your question?