Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

[US8323] print config values #3

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ad0afcd
url hardcoding removed
Oct 3, 2019
ea1fd53
forter replaced by LR
Oct 3, 2019
558fead
license file renamed
Oct 3, 2019
63040c5
logrhythm text updated
Oct 11, 2019
ab1f09c
response updated
Nov 14, 2019
91a2f29
requests spaced, timestamp added in both the logs, too many requests …
Nov 26, 2019
65a0d31
position timestamp condition updated
Nov 26, 2019
148891f
time period updated in config
Nov 26, 2019
ff3fabc
extra commented code removed
Nov 26, 2019
53bb20a
publish indivisual events instead of bulk
Nov 28, 2019
1fcf6b4
writing event time in pos file
Nov 28, 2019
b38f45d
added position handler
Nov 28, 2019
2f70422
data duplication and alert parsing resolved
Nov 29, 2019
d056902
commented code removed
Nov 29, 2019
4aca56c
position file location changed
Nov 29, 2019
6fc64f6
logging added in position handler
Nov 29, 2019
f247ddb
pos file path updated
Nov 29, 2019
9fa0855
pos file location updated and unused functions removed
Nov 29, 2019
c601e4f
encryption added
Feb 25, 2020
a8959bc
crypto package included
Feb 25, 2020
e33a1d5
invalid credential check added
Mar 16, 2020
7e1aafe
invalid credential check added
Mar 16, 2020
b04da24
error message updated
Mar 16, 2020
b24cb27
message updated
Mar 16, 2020
bd2bc81
Merge pull request #2 from logrhythm/DE10297-handle-invalid-credentials
rajanjoshigl Mar 16, 2020
beecce6
conflicts removed
Mar 16, 2020
af299f2
conflicts resolved
Mar 17, 2020
c80c894
counter added
Mar 19, 2020
84ada03
code optimized
Mar 20, 2020
30dd103
mps added
Mar 21, 2020
478036b
cpeer code review done
Mar 21, 2020
e3e0045
function for counter update added
Mar 21, 2020
a832f3c
Merge pull request #3 from logrhythm/mps-counter-added
rajanjoshigl Mar 21, 2020
6e02abc
heartbeat added
Mar 21, 2020
9fcfdb2
extra files removed'
Mar 21, 2020
46c31e1
extra package removed
Mar 21, 2020
073d749
status message changed
Mar 21, 2020
1d4b4ba
Merge pull request #4 from logrhythm/sophos-heartbeat
rajanjoshigl Mar 21, 2020
7085972
package added
Mar 21, 2020
77a144b
bug fix
May 7, 2020
3598560
Total logging is set to debug mode
May 13, 2020
805975b
print config values
May 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
.DS_Store
/sophoscentralbeat
/sophoscentralbeat.test
logs/*
data/*
*.exe
*/go.mod
*.pyc
88 changes: 44 additions & 44 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
sudo: required
dist: trusty
services:
- docker

language: go

go:
- 1.11.2

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/forter/sophoscentralbeat/
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/forter/sophoscentralbeat/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/forter/sophoscentralbeat/
- cd $HOME/gopath/src/github.com/forter/sophoscentralbeat/

install:
- true

script:
- make $TARGETS

after_success:
# Copy full.cov to coverage.txt because codecov.io requires this file
sudo: required
dist: trusty
services:
- docker
language: go
go:
- 1.11.2
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/logrhythm/sophoscentralbeat/
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/logrhythm/sophoscentralbeat/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/logrhythm/sophoscentralbeat/
- cd $HOME/gopath/src/github.com/logrhythm/sophoscentralbeat/
install:
- true
script:
- make $TARGETS
after_success:
# Copy full.cov to coverage.txt because codecov.io requires this file
44 changes: 22 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
FROM golang:stretch AS builder
MAINTAINER Forter RnD

WORKDIR /go/src/github.com/forter/sophoscentralbeat
RUN mkdir -p /config
RUN apt-get update && \
apt-get install -y \
git gcc g++ binutils make
RUN mkdir -p ${GOPATH}/src/github.com/elastic && git clone https://github.com/elastic/beats ${GOPATH}/src/github.com/elastic/beats
COPY . /go/src/github.com/forter/sophoscentralbeat/
RUN make
RUN chmod +x sophoscentralbeat
# ---

FROM ubuntu:latest
COPY --from=builder /go/src/github.com/forter/sophoscentralbeat/sophoscentralbeat /bin/sophoscentralbeat
RUN apt-get -y update \
&& apt-get -y install ca-certificates dumb-init curl \
&& update-ca-certificates
VOLUME /config/beat.yml
ENTRYPOINT [ "/bin/sophoscentralbeat" ]
CMD [ "-e -c /config/beat.yml" ]
FROM golang:stretch AS builder
MAINTAINER logrhythm RnD
WORKDIR /go/src/github.com/logrhythm/sophoscentralbeat
RUN mkdir -p /config
RUN apt-get update && \
apt-get install -y \
git gcc g++ binutils make
RUN mkdir -p ${GOPATH}/src/github.com/elastic && git clone https://github.com/elastic/beats ${GOPATH}/src/github.com/elastic/beats
COPY . /go/src/github.com/logrhythm/sophoscentralbeat/
RUN make
RUN chmod +x sophoscentralbeat
# ---
FROM ubuntu:latest
COPY --from=builder /go/src/github.com/logrhythm/sophoscentralbeat/sophoscentralbeat /bin/sophoscentralbeat
RUN apt-get -y update \
&& apt-get -y install ca-certificates dumb-init curl \
&& update-ca-certificates
VOLUME /config/beat.yml
ENTRYPOINT [ "/bin/sophoscentralbeat" ]
CMD [ "-e -c /config/beat.yml" ]
26 changes: 13 additions & 13 deletions LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Copyright (c) 2019 Forter RnD

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.
Copyright (c) 2019 logrhythm RnD
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.
80 changes: 40 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
BEAT_NAME=sophoscentralbeat
BEAT_PATH=github.com/forter/sophoscentralbeat
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS?=./vendor/github.com/elastic/beats
LIBBEAT_MAKEFILE=$(ES_BEATS)/libbeat/scripts/Makefile
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
NO_COLLECT=true

# Path to the libbeat Makefile
-include $(LIBBEAT_MAKEFILE)

# Initial beat setup
.PHONY: setup
setup: pre-setup git-add

pre-setup: copy-vendor git-init
$(MAKE) -f $(LIBBEAT_MAKEFILE) mage ES_BEATS=$(ES_BEATS)
$(MAKE) -f $(LIBBEAT_MAKEFILE) update BEAT_NAME=$(BEAT_NAME) ES_BEATS=$(ES_BEATS) NO_COLLECT=$(NO_COLLECT)

# 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 sophoscentralbeat files"
BEAT_NAME=sophoscentralbeat
BEAT_PATH=github.com/logrhythm/sophoscentralbeat
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS?=./vendor/github.com/elastic/beats
LIBBEAT_MAKEFILE=$(ES_BEATS)/libbeat/scripts/Makefile
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
NO_COLLECT=true
# Path to the libbeat Makefile
-include $(LIBBEAT_MAKEFILE)
# Initial beat setup
.PHONY: setup
setup: pre-setup git-add
pre-setup: copy-vendor git-init
$(MAKE) -f $(LIBBEAT_MAKEFILE) mage ES_BEATS=$(ES_BEATS)
$(MAKE) -f $(LIBBEAT_MAKEFILE) update BEAT_NAME=$(BEAT_NAME) ES_BEATS=$(ES_BEATS) NO_COLLECT=$(NO_COLLECT)
# 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 sophoscentralbeat files"
10 changes: 5 additions & 5 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sophoscentralbeat
Copyright 2019 Forter RnD

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
sophoscentralbeat
Copyright 2019 logrhythm RnD
This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
Loading