Giter VIP home page Giter VIP logo

openconfigbeat's Introduction

Openconfigbeat

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

Ensure that this folder is at the following location: ${GOPATH}/src/github.com/aristanetworks, or if you prefer you can download a prebuilt binary under releases.

preview

Getting Started with Openconfigbeat

Requirements

Configuration

Edit _meta/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 openconfigbeat

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 output.elasticsearch=elasticsearch:9200

To run as a container:

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

Update

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

make update

Cleanup

To clean Openconfigbeat source code, run the following commands:

make fmt

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}/src/github.com/aristanetworks
cd ${GOPATH}/src/github.com/aristanetworks
git clone https://github.com/aristanetworks/openconfigbeat

For further development, check out the beat developer guide.

openconfigbeat's People

Contributors

7ac avatar arista-jenkins avatar chuchutrain-arista avatar

Stargazers

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

Watchers

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

openconfigbeat's Issues

adding daemon option to openconfigbeat

The beats: filebeat, metricbeat and packetbeat (the ones I checked, there might be other) include a binary wrapper called [beat name]-god in the directory /usr/share/[beat name]/bin. This is a wrapper to the beat that is launched at system startup.

Please add this feature to openconfigbeat.

Issue with latest version

Hi,

I tried the latest version of the beat and ran into this issue related to templates:

arista@lanzLab-vm2:~/go/bin$ ./openconfigbeat -e -d "1"
2016/11/08 21:49:53.685657 beat.go:223: INFO Home path: [/home/arista/go/bin] Config path: [/home/arista/go/bin] Data path: [/home/arista/go/bin/data] Logs path: [/home/arista/go/bin/logs]
2016/11/08 21:49:53.685757 beat.go:244: INFO Setup Beat: openconfigbeat; Version: 5.0.0-SNAPSHOT
2016/11/08 21:49:53.685829 output.go:141: INFO Loading template enabled. Reading template file: /home/arista/go/bin/openconfigbeat.template.json
2016/11/08 21:49:53.685919 outputs.go:88: INFO Activated elasticsearch as output plugin.
2016/11/08 21:49:53.686021 publish.go:292: INFO Publisher name: lanzLab-vm2
2016/11/08 21:49:53.686177 async.go:63: INFO Flush Interval set to: 1s
2016/11/08 21:49:53.686205 async.go:64: INFO Max Bulk Size set to: 50
2016/11/08 21:49:53.686456 beat.go:272: INFO openconfigbeat start running.
2016/11/08 21:49:53.686484 openconfigbeat.go:124: INFO openconfigbeat is running! Hit CTRL-C to stop it.
2016/11/08 21:49:53.686607 openconfigbeat.go:133: INFO Connected to 172.28.130.120:6042
2016/11/08 21:49:53.687860 openconfigbeat.go:133: INFO Connected to 172.28.129.109:6042
2016/11/08 21:49:53.688671 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"LANZ" > > >
2016/11/08 21:49:53.688824 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"LANZ" > > >
2016/11/08 21:49:53.688952 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"temperature" element:"status" > > >
2016/11/08 21:49:53.689083 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"temperature" element:"status" > > >
2016/11/08 21:49:53.689324 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"power" element:"status" > > >
2016/11/08 21:49:53.689530 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"power" element:"status" > > >
2016/11/08 21:49:53.689741 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"thermostat" element:"status" > > >
2016/11/08 21:49:53.690073 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"thermostat" element:"status" > > >
2016/11/08 21:49:53.690660 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"cooling" element:"status" > > >
2016/11/08 21:49:53.691156 openconfigbeat.go:163: INFO Sending subscribe request: subscribe:<subscription:<path:<element:"" element:"Sysdb" element:"environment" element:"cooling" element:"status" > > >
2016/11/08 21:49:53.702771 output.go:159: INFO Trying to load template for client: &{{http://localhost:9200   %!s(*http.Client=&{0xc4201d4000 <nil> <nil> 90000000000}) %!s(bool=true) %!s(func() error=0x5e9140)} openconfigbeat map[] {{ <nil> %!s(bool=false) %!s(int=0) %!s(int=0) %!s(int=0)}  %!s(elasticsearch.state=0) }}
2016/11/08 21:49:53.703811 output.go:166: INFO Existing template will be overwritten, as overwrite is enabled.
2016/11/08 21:49:54.665330 single.go:130: INFO Connecting error publishing events (retrying): Connection marked as failed because the onConnect callback failed: Could not load template: Template could not be loaded. Error: 400 Bad Request
2016/11/08 21:49:54.665360 single.go:145: INFO send fail
2016/11/08 21:49:55.666829 output.go:159: INFO Trying to load template for client: &{{http://localhost:9200   %!s(*http.Client=&{0xc4201d4000 <nil> <nil> 90000000000}) %!s(bool=true) %!s(func() error=0x5e9140)} openconfigbeat map[] {{ <nil> %!s(bool=false) %!s(int=0) %!s(int=0) %!s(int=0)}  %!s(elasticsearch.state=0) }}
2016/11/08 21:49:55.667460 output.go:166: INFO Existing template will be overwritten, as overwrite is enabled.
**2016/11/08 21:49:56.288497 single.go:130: INFO Connecting error publishing events (retrying): Connection marked as failed because the onConnect callback failed: Could not load template: Template could not be loaded. Error: 400 Bad Request**
2016/11/08 21:49:56.288522 single.go:145: INFO send fail
^C2016/11/08 21:49:57.440841 beat.go:280: INFO openconfigbeat cleanup

Any other info needed? I tried an older version which gets further but each stat is within a new branch of JSON, i.e.:

"update": {
      "Sysdb": {
        "interface": {
          "counter": {
            "eth": {
              "slice": {
                "phy": {
                  "Linecard3": {
                    "intfCounterDir": {
                      "Ethernet3/13/1": {
                        "intfCounter": {
                          "current": {
                            "rates": {
                              "outBitsRate": 617.4555192973619,
                              "rates": {
                                "inBitsRate": 5e-324,
                                "rates": {
                                  "rates": {
                                    "outPktsRate": 0.680042492919596,
                                    "rates": {
                                      "ethStatistics": {
                                        "ethStatistics": {
                                          "ethStatistics": {
                                            "ethStatistics": {
                                              "ethStatistics": {
                                                "ethStatistics": {
                                                  "ethStatistics": {
                                                    "ethStatistics": {
                                                      "ethStatistics": {
                                                        "ethStatistics": {
                                                          "ethStatistics": {
                                                            "ethStatistics": {
                                                              "ethStatistics": {
                                                                "ethStatistics": {
                                                                  "ethStatistics": {
                                                                    "ethStatistics": {
                                                                      "ethStatistics": {
                                                                        "ethStatistics": {
                                                                          "ethStatistics": {
                                                                            "ethStatistics": {
                                                                              "ethStatistics": {
                                                                                "ethStatistics": {
                                                                                  "carrierSenseErrors": 0,
                                                                                  "ethStatistics": {
                                                                                    "ethStatistics": {
                                                                                      "ethStatistics": {
                                                                                        "ethStatistics": {
                                                                                          "ethStatistics": {
                                                                                            "ethStatistics": {
                                                                                              "ethStatistics": {
                                                                                                "ethStatistics": {
                                                                                                  "ethStatistics": {
                                                                                                    "deferredTransmissions": 0,
                                                                                                    "ethStatistics": {
                                                                                                      "alignmentErrors": 0,
                                                                                                      "ethStatistics": {
                                                                                                        "ethStatistics": {
                                                                                                          "ethStatistics": {
                                                                                                            "ethStatistics": {
                                                                                                              "ethStatistics": {
                                                                                                                "singleCollisionFrames": 0,
                                                                                                                "statistics": {
                                                                                                                  "inMulticastPkts": 0,
                                                                                                                  "statistics": {
                                                                                                                    "outOctets": 1535768817742,
                                                                                                                    "statistics": {
                                                                                                                      "inOctets": 11072,
                                                                                                                      "statistics": {
                                                                                                                        "lastUpdate": 1634419.025426643,
                                                                                                                        "statistics": {
                                                                                                                          "outMulticastPkts": 1185161,
                                                                                                                          "statistics": {
                                                                                                                            "outBroadcastPkts": 143,
                                                                                                                            "statistics": {
                                                                                                                              "inUcastPkts": 107,
                                                                                                                              "statistics": {
                                                                                                                                "inErrors": 0,
                                                                                                                                "statistics": {
                                                                                                                                  "outDiscards": 5793114,
                                                                                                                                  "statistics": {
                                                                                                                                    "outErrors": 0,
                                                                                                                                    "statistics": {
                                                                                                                                      "outUcastPkts": 1011614269,
                                                                                                                                      "statistics": {
                                                                                                                                        "inBroadcastPkts": 66,
                                                                                                                                        "statistics": {
                                                                                                                                          "inDiscards": 0
                                                                                                                                        }
                                                                                                                                      }
                                                                                                                                    }
                                                                                                                                  }
                                                                                                                                }
                                                                                                                              }
                                                                                                                            }
                                                                                                                          }
                                                                                                                        }
                                                                                                                      }
                                                                                                                    }
                                                                                                                  }
                                                                                                                }
                                                                                                              },
                                                                                                              "out64OctetFrames": 513
                                                                                                            },
                                                                                                            "frameTooLongs": 0
                                                                                                          },
                                                                                                          "frameTooShorts": 0
                                                                                                        },
                                                                                                        "internalMacTransmitErrors": 0
                                                                                                      }
                                                                                                    }
                                                                                                  },
                                                                                                  "inPfcFrames": 0
                                                                                                },
                                                                                                "outPfcFrames": 0
                                                                                              },
                                                                                              "in128To255OctetFrames": 0
                                                                                            },
                                                                                            "excessiveCollisions": 0
                                                                                          },
                                                                                          "multipleCollisionFrames": 0
                                                                                        },
                                                                                        "in1523ToMaxOctetFrames": 0
                                                                                      },
                                                                                      "inPauseFrames": 0
                                                                                    },
                                                                                    "inUnknownOpcodes": 0
                                                                                  }
                                                                                },
                                                                                "inPfcClassFrames": [
                                                                                  0,
                                                                                  0,
                                                                                  0,
                                                                                  0,
                                                                                  0,
                                                                                  0,
                                                                                  0,
                                                                                  0
                                                                                ]
                                                                              },
                                                                              "out1523ToMaxOctetFrames": 0
                                                                            },
                                                                            "out256To511OctetFrames": 0
                                                                          },
                                                                          "out65To127OctetFrames": 1130699
                                                                        },
                                                                        "outPauseFrames": 0
                                                                      },
                                                                      "out512To1023OctetFrames": 0
                                                                    },
                                                                    "fcsErrors": 0
                                                                  },
                                                                  "out1024To1522OctetFrames": 1011613899
                                                                },
                                                                "in512To1023OctetFrames": 0
                                                              },
                                                              "jabbers": 0
                                                            },
                                                            "symbolErrors": 0
                                                          },
                                                          "internalMacReceiveErrors": 0
                                                        },
                                                        "lateCollisions": 0
                                                      },
                                                      "in64OctetFrames": 173
                                                    },
                                                    "outPfcClassFrames": [
                                                      0,
                                                      0,
                                                      0,
                                                      0,
                                                      0,
                                                      0,
                                                      0,
                                                      0
                                                    ]
                                                  },
                                                  "in65To127OctetFrames": 0
                                                },
                                                "sqeTestErrors": 0
                                              },
                                              "out128To255OctetFrames": 54462
                                            },
                                            "in1024To1522OctetFrames": 0
                                          },
                                          "in256To511OctetFrames": 0
                                        },
                                        "fragments": 0
                                      },
                                      "inPktsRate": 5e-324
                                    }
                                  },
                                  "statsUpdateTime": 1634419.025426643
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "fields": {
    "@timestamp": [
      1478641466980
    ]
  },
  "sort": [
    1478641466980
  ]
}

unable to read config file

Thanks for the last fixes, I pulled the latest and the template issues have gone. But now I get:

2016/11/09 15:02:38.735355 beat.go:267: INFO Home path: [/home/arista/go/src/github.com/aristanetworks/openconfigbeat] Config path: [/home/arista/go/src/github.com/aristanetworks/openconfigbeat] Data path: [/home/arista/go/src/github.com/aristanetworks/openconfigbeat/data] Logs path: [/home/arista/go/src/github.com/aristanetworks/openconfigbeat/logs]
2016/11/09 15:02:38.735395 beat.go:177: INFO Setup Beat: openconfigbeat; Version: 6.0.0-alpha1
2016/11/09 15:02:38.735413 processor.go:43: DBG  Processors:
2016/11/09 15:02:38.735426 beat.go:183: DBG  Initializing output plugins
2016/11/09 15:02:38.735515 output.go:167: INFO Loading template enabled. Reading template file: /home/arista/go/src/github.com/aristanetworks/openconfigbeat/openconfigbeat.template.json
2016/11/09 15:02:38.735624 logp.go:219: INFO Metrics logging every 30s
2016/11/09 15:02:38.735679 output.go:178: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: /home/arista/go/src/github.com/aristanetworks/openconfigbeat/openconfigbeat.template-es2x.json
2016/11/09 15:02:38.736108 client.go:107: INFO Elasticsearch url: http://localhost:9200
2016/11/09 15:02:38.736185 outputs.go:106: INFO Activated elasticsearch as output plugin.
2016/11/09 15:02:38.736230 publish.go:234: DBG  Create output worker
2016/11/09 15:02:38.736324 publish.go:276: DBG  No output is defined to store the topology. The server fields might not be filled.
2016/11/09 15:02:38.736413 publish.go:291: INFO Publisher name: lanzLab-vm2
2016/11/09 15:02:38.736602 async.go:63: INFO Flush Interval set to: 1s
2016/11/09 15:02:38.736656 async.go:64: INFO Max Bulk Size set to: 50
2016/11/09 15:02:38.736698 async.go:72: DBG  create bulk processing worker (interval=1s, bulk size=50)
2016/11/09 15:02:38.736825 beat.go:288: CRIT Exiting: Error reading config file: Please specify at least a device to connect to in 'addresses' accessing config
Exiting: Error reading config file: Please specify at least a device to connect to in 'addresses' accessing config```

Config file does have devices defined:

```################### Openconfigbeat Configuration Example #########################

############################# Openconfigbeat ######################################

openconfigbeat:
  # Defines the addresses of the OpenConfig devices to connect to
  addresses: ["172.28.130.120:6042", "172.28.129.109:6042:6042"]
  # Defines the OpenConfig paths to subscribe to
  paths: ["/Sysdb/environment/temperature/status"]```

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.