Elastic Beat for OpenConfig
Go Makefile Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
beater
config
dev-tools/packer
docs
etc
tests/system
vendor
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
Dockerfile
LICENSE
Makefile
README.md
glide.lock
glide.yaml
main.go
main_test.go
openconfigbeat.full.yml
openconfigbeat.template-es2x.json
openconfigbeat.template.json
openconfigbeat.yml

README.md

Build Status

Openconfigbeat

Welcome to Openconfigbeat, the Beat for OpenConfig-compatible network devices.

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

Document example:

{
  "@timestamp": "2016-10-06T22:38:51.770Z",
  "beat": {
    "hostname": "beater",
    "name": "openconfigbeat"
  },
  "dataset": "cairo",
  "type": "openconfigbeat",
  "update": {
    "/": {
      "openconfig-bgp:bgp": {
        "global": {
          "config": {
            "as": 55064,
            "router-id": "0.0.0.0"
          },
        },
      },
      "openconfig-vlan:vlans": {
        "vlan": [
          {
            "config": {
              "name": "default",
              "status": "ACTIVE",
              "tpid": "oc-vlan-types:TPID_0x8100",
              "vlan-id": 1
            },
            "state": {
              "status": "ACTIVE",
              "tpid": "oc-vlan-types:TPID_0x8100"
            },
            "vlan-id": 1
          }
        ]
      }
    }
  }
}

Getting Started with Openconfigbeat

Requirements

Configuration

Edit etc/beat.yml with the appropriate configuration.

Build

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

make

Run

To run Openconfigbeat with debugging output enabled, run:

./openconfigbeat -e -d openconfigbeat.go

To override an individual setting in the config file you can use -E, for example:

./openconfigbeat -E openconfigbeat.addresses=device1,device2

To run as a container:

docker run aristanetworks/openconfigbeat -E openconfigbeat.addresses=device

Package

To be able to package Openconfigbeat the requirements are as follows:

  • Docker Environment >= 1.10
  • $GOPATH/bin must be part of $PATH: export PATH=${PATH}:${GOPATH}/bin

To cross-compile and package Openconfigbeat for all supported platforms, run the following commands:

cd dev-tools/packer
make deps
make images
make

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/openconfigbeat.template.json, etc/openconfigbeat.asciidoc and openconfigbeat.yml

make update

Cleanup

To clean Openconfigbeat source code, run the following commands:

make fmt
make simplify

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

make clean

Clone

To clone Openconfigbeat from the git repository, run the following commands:

mkdir -p ${GOPATH}/github.com/aristanetworks
cd ${GOPATH}/github.com/aristanetworks
git clone https://github.com/aristanetworks/openconfigbeat

For further development, check out the beat developer guide.