-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a0477a4
Showing
7,242 changed files
with
1,574,199 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# See: http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.json] | ||
indent_size = 4 | ||
indent_style = space | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[Vagrantfile] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.idea | ||
/build | ||
|
||
.DS_Store | ||
/macwifibeat | ||
/macwifibeat.test | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
sudo: required | ||
dist: trusty | ||
services: | ||
- docker | ||
|
||
language: go | ||
|
||
go: | ||
- 1.10.3 | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
env: | ||
matrix: | ||
- TARGETS="check" | ||
- TARGETS="testsuite" | ||
|
||
global: | ||
# Cross-compile for amd64 only to speed up testing. | ||
- GOX_FLAGS="-arch amd64" | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- python-virtualenv | ||
|
||
before_install: | ||
- umask 022 | ||
# Redo the travis setup but with the elastic/libbeat path. This is needed so the package path is correct | ||
- mkdir -p $HOME/gopath/src/github.com/bozdag/macwifibeat/ | ||
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/bozdag/macwifibeat/ | ||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/bozdag/macwifibeat/ | ||
- cd $HOME/gopath/src/github.com/bozdag/macwifibeat/ | ||
|
||
install: | ||
- true | ||
|
||
script: | ||
- make $TARGETS | ||
|
||
after_success: | ||
# Copy full.cov to coverage.txt because codecov.io requires this file |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright (c) 2017 Selcuk Bozdag | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
BEAT_NAME=macwifibeat | ||
BEAT_PATH=github.com/bozdag/macwifibeat | ||
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH})) | ||
SYSTEM_TESTS=false | ||
TEST_ENVIRONMENT=false | ||
ES_BEATS?=./vendor/github.com/elastic/beats | ||
GOPACKAGES=$(shell govendor list -no-status +local) | ||
GOBUILD_FLAGS=-i -ldflags "-X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.buildTime=$(NOW) -X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.commit=$(COMMIT_ID)" | ||
MAGE_IMPORT_PATH=${BEAT_PATH}/vendor/github.com/magefile/mage | ||
|
||
# Path to the libbeat Makefile | ||
-include $(ES_BEATS)/libbeat/scripts/Makefile | ||
|
||
# Initial beat setup | ||
.PHONY: setup | ||
setup: copy-vendor git-init update git-add | ||
|
||
# Copy beats into vendor directory | ||
.PHONY: copy-vendor | ||
copy-vendor: | ||
mkdir -p vendor/github.com/elastic | ||
cp -R ${BEAT_GOPATH}/src/github.com/elastic/beats vendor/github.com/elastic/ | ||
rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack | ||
mkdir -p vendor/github.com/magefile | ||
cp -R ${BEAT_GOPATH}/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile | ||
|
||
.PHONY: git-init | ||
git-init: | ||
git init | ||
|
||
.PHONY: git-add | ||
git-add: | ||
git add -A | ||
git commit -m "Add generated macwifibeat files" | ||
|
||
# Collects all dependencies and then calls update | ||
.PHONY: collect | ||
collect: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
macwifibeat | ||
Copyright 2017 Selcuk Bozdag | ||
|
||
This product includes software developed by The Apache Software | ||
Foundation (http://www.apache.org/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# Macwifibeat | ||
|
||
Welcome to Macwifibeat. | ||
|
||
Ensure that this folder is at the following location: | ||
`${GOPATH}/src/github.com/bozdag/macwifibeat` | ||
|
||
## Getting Started with Macwifibeat | ||
|
||
### Requirements | ||
|
||
* [Golang](https://golang.org/dl/) 1.7 | ||
|
||
### Init Project | ||
To get running with Macwifibeat 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 Macwifibeat in the git repository, run the following commands: | ||
|
||
``` | ||
git remote set-url origin https://github.com/bozdag/macwifibeat | ||
git push origin master | ||
``` | ||
|
||
For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html). | ||
|
||
### Build | ||
|
||
To build the binary for Macwifibeat run the command below. This will generate a binary | ||
in the same directory with the name macwifibeat. | ||
|
||
``` | ||
make | ||
``` | ||
|
||
|
||
### Run | ||
|
||
To run Macwifibeat with debugging output enabled, run: | ||
|
||
``` | ||
./macwifibeat -c macwifibeat.yml -e -d "*" | ||
``` | ||
|
||
|
||
### Test | ||
|
||
To test Macwifibeat, 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 | ||
``` | ||
|
||
|
||
### Cleanup | ||
|
||
To clean Macwifibeat 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 Macwifibeat from the git repository, run the following commands: | ||
|
||
``` | ||
mkdir -p ${GOPATH}/src/github.com/bozdag/macwifibeat | ||
git clone https://github.com/bozdag/macwifibeat ${GOPATH}/src/github.com/bozdag/macwifibeat | ||
``` | ||
|
||
|
||
For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html). | ||
|
||
|
||
## Packaging | ||
|
||
The beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires [docker](https://www.docker.com/) 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
################### Macwifibeat Configuration Example ######################### | ||
|
||
############################# Macwifibeat ###################################### | ||
|
||
macwifibeat: | ||
# Defines how often an event is sent to the output | ||
period: 1s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- key: macwifibeat | ||
title: macwifibeat | ||
description: | ||
fields: | ||
- name: counter | ||
type: long | ||
required: true | ||
description: > | ||
PLEASE UPDATE DOCUMENTATION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"fieldFormatMap": "{\"@timestamp\":{\"id\":\"date\"}}", | ||
"fields": "[{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"counter\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.hostname\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.timezone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"beat.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"@timestamp\",\"scripted\":false,\"searchable\":true,\"type\":\"date\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"tags\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"fields\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.message\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.code\",\"scripted\":false,\"searchable\":true,\"type\":\"number\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"error.type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.provider\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.instance_name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.machine_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.availability_zone\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.project_id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"meta.cloud.region\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"docker.container.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.id\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.architecture\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.platform\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.version\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.os.family\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.ip\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"host.mac\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.pod.uid\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.namespace\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.node.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.labels\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.annotations\",\"scripted\":false,\"searchable\":true},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.name\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":true,\"indexed\":true,\"name\":\"kubernetes.container.image\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_id\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":true,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_type\",\"scripted\":false,\"searchable\":true,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_index\",\"scripted\":false,\"searchable\":false,\"type\":\"string\"},{\"aggregatable\":false,\"analyzed\":false,\"count\":0,\"doc_values\":false,\"indexed\":false,\"name\":\"_score\",\"scripted\":false,\"searchable\":false,\"type\":\"number\"}]", | ||
"timeFieldName": "@timestamp", | ||
"title": "macwifibeat-*" | ||
} |
Oops, something went wrong.