aalogbeat

command module
v0.0.0-...-fe70ff5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

Aalogbeat

Aalogbeat is an Elastic Beat that reads Wonderware log files, typically for forwarding to Elasticsearch.

Ensure that this folder is at the following location: ${GOPATH}/src/github.com/logic-danderson/aalogbeat

Getting Started with Aalogbeat

Installing
  • Download a release
  • Extract the ZIP
  • Edit aalogbeat.yml to configure Aalogbeat, including where to find the log files and how to connect to Elasticsearch. See aalogbeat.reference.yml for examples and descriptions.
  • Use the install-service-aalogbeat.ps1 PowerShell script to register Aalogeat as a Windows service.
  • Start the service.
Requirements
Init Project

To get running with Aalogbeat and also install the dependencies, run the following command:

make setup

It will create a clean git history for each major step. Note that you can always rewrite the history if you wish before pushing your changes.

To push Aalogbeat in the git repository, run the following commands:

git remote set-url origin https://github.com/logic-danderson/aalogbeat
git push origin master

For further development, check out the beat developer guide.

Build

To build the Linux binary for Aalogbeat run the command below. This will generate a binary in the same directory with the name aalogbeat.

make

To build the Windows binary for Aalogbeat run the command below. This will generate a Windows excutable in the same directory with the name aalogbeat.exe.

GOOS=windows GOARCH=amd64 go build
Run

To run Aalogbeat with debugging output enabled in Linux, run:

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

To run Aalogbeat with debugging output enabled in Windows, run:

aalogbeat.exe -c aalogbeat.yml -e -d "*"

There are also PowerShell scripts install-service-aalogbeat.ps1 and uninstall-service-aalogbeat.ps1 that can be used to configure Aalogbeat to run as a Windows service.

Test

To test Aalogbeat, 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 fields.yml by running the following command.

make update
Publishing Dashboards

Copy the files it generated in _meta/kibana.generated/7/dashboard to kibana/7/dashboard. Then run:

./aalogbeat setup --dashboards
Exporting Dashboards

To export dashboards for inclusion into the project, run:

go run vendor/github.com/elastic/beats/dev-tools/cmd/dashboards/export_dashboards.go -yml dashboards.yml

That will update the dashboard files under _meta/kibana/7/dashboard.

Then run:

make update

Which will copy the dashboard files from _meta/kibana/7/dashboard to _meta/kibana.generated/7/dashboard.

Cleanup

To clean Aalogbeat source code, run the following command:

make fmt

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

make clean
Clone

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

mkdir -p ${GOPATH}/src/github.com/logic-danderson/aalogbeat
git clone https://github.com/logic-danderson/aalogbeat ${GOPATH}/src/github.com/logic-danderson/aalogbeat

For further development, check out the beat developer guide.

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 release

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL