Giter VIP home page Giter VIP logo

otilio's Introduction

Otilio

Build Status Go Report Card

Welcome to Otilio. Beat to query SNMP data. This was built following Beats developer guide and uses gosnmp library.

Example setup (see otilo.yml):

otilio:
  # Defines how often an event is sent to the output
  period: 1s

  # SNMP hosts to query
  hosts: ["192.168.1.1", "192.168.1.2"]

  # SMNP version: 1, 2c or 3
  version: 2c

  # SNMP community
  community: "public"

  # oids to query
  # (the starting dot is intended)
  oids:
    - {oid: ".1.3.6.1.2.1.1.1.0", name: sysDescr}
    - {oid: ".1.3.6.1.2.1.1.3.0", name: sysUpTime}

This will get oids 1.3.6.1.2.1.1.1.0 and 1.3.6.1.2.1.1.3.0 from SNMP servers at 192.168.1.1 and 192.168.1.2 and store them in otilio-YYYY.MM.DD index in Elasticsearch in fields sysDescr and sysUpTime.

SNMP V3 configuration example

otilio:
  # Defines how often an event is sent to the output
  period: 1s

  # SNMP host to query
  hosts: ["127.0.0.1"]
  port: 10161

  # SMNP version
  version: 3

  # SNMP user security model parameters
  # currently only SHA auth and DES encryption supported ¯\_(ツ)_/¯
  user: "theuser"
  authpass: "theauthpassword"
  privpass: "theprivacyencryptionpassword"

  # oids to query
  # (the starting dot is intended)
  oids:
    - {oid: ".1.3.6.1.2.1.25.1", name: hrSystem}

Building

Ensure that this folder is at the following location: ${GOPATH}/github.com/isalgueiro/otilio

Requirements

Build

To build the binary for Otilio run the command below. This will generate a binary in the same directory with the name otilio.

make

Run

To run Otilio with debugging output enabled, run:

./otilio -c otilio.yml -e -d "*"

Test

To test Otilio, run the following command:

make testsuite

alternatively:

make unit-tests
make system-tests
make integration-tests
make coverage-report

The test coverage is reported in the folder ./build/coverage/

Update

Each beat has a template for the mapping in elasticsearch and a documentation for the fields which is automatically generated based on etc/fields.yml. To generate etc/otilio.template.json and etc/otilio.asciidoc

make update

Please check index settings, as they may not fit your use case.

Cleanup

To clean Otilio source code, run the following commands:

make fmt
make simplify

To clean up the build directory and generated artifacts, run:

make clean

Packaging

The beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires docker and vendoring as described above. To build packages of your beat, run the following command:

make package

This will fetch and create all images required for the build process. The hole process to finish can take several minutes.

otilio's People

Contributors

isalgueiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

otilio's Issues

`go get github.com/isalgueiro/otilio` fails

go get fails as below. What's wrong?

$ docker run -it golang go get github.com/isalgueiro/otilio
# cd /go/src/github.com/isalgueiro/otilio; git submodule update --init --recursive
fatal: No url found for submodule path 'src/github.com/MichaelTJones/walk' in .gitmodules
package github.com/isalgueiro/otilio: exit status 128

Thank you.

Compatibility with 6.x

Hi!

I would like to know if there is some possibility to integrate Otilio on 6.x. For instance, if one wants to send data to Logstash, index creation on 6.x is different from 5.x:

6.x

output {
 elasticsearch {
  hosts => "localhost:9200"
  manage_template => false
  index => "%{\[@metadata\]\[beat\]}-%{\[@metadata\]\[version\]}-%{+YYYY.MM.dd}"
  document_type => "%{\[@metadata\]\[type\]}"
 }
}

5.x

output {
 elasticsearch {
  hosts =>  "localhost:9200"
  manage_template =>  false
  index =>  "%{\[@metadata\]\[beat\]}-%{+YYYY.MM.dd}"
  document_type =>  "%{\[@metadata\]\[type\]}"
  }
}

Thanks in advance,

Regards 🖖

snmpv3

This looks great.
Any plans to provide support for snmpv3?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.