Skip to content

Commit

Permalink
Merge pull request #2 from hartfordfive/0.1.1
Browse files Browse the repository at this point in the history
Version 0.1.1
  • Loading branch information
hartfordfive committed May 2, 2017
2 parents 4e8641f + 4621dd1 commit 6c3a28b
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
/.idea
/build

/bin
.DS_Store
/protologbeat
/protologbeat.test
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,5 @@

### Version 0.1.1
- Added Dockerfile and seperate `protologbeat-docker.yml` config file to be used by docker image
- Updated default `protologbeat.yml` to have bare-minimum config values
- Added `build-bin.sh` build script to simplify compiling the binary for the most common platforms
46 changes: 46 additions & 0 deletions Dockerfile
@@ -0,0 +1,46 @@
FROM node:6-alpine

# Misc
LABEL Description="Protologbeat Docker image based on Alpine" Vendor="Alain Lefebvre"
MAINTAINER Alain Lefebvre <hartfordfive@gmail.com>

#RUN apk update && \
# apk upgrade && \
# apk add curl

ARG version
ENV VERSION=$version

RUN set -ex ;\
# Ensure kibana user exists
addgroup -S protologbeat && adduser -S -G protologbeat protologbeat ;\
# Install dependencies
apk --no-cache add bash fontconfig gettext su-exec tini curl ;\
# Fix permissions
mkdir -p /opt/protologbeat/conf && mkdir -p /opt/protologbeat/ssl

RUN curl -Lso - https://github.com/hartfordfive/protologbeat/releases/download/${VERSION}/protologbeat-${VERSION}-linux-x86_64.tar.gz | \
tar zxf - -C /tmp && \
cp /tmp/protologbeat-${VERSION}-linux-x86_64 /opt/protologbeat/protologbeat
# cp /tmp/protologbeat-0.1.0-linux-x86_64 /usr/share/protologbeat

ENV PATH=/opt/protologbeat:$PATH

COPY protologbeat-docker.yml /opt/protologbeat/conf/protologbeat.yml
COPY protologbeat.template-es2x.json /opt/protologbeat
COPY protologbeat.template.json /opt/protologbeat

RUN chown -R protologbeat:protologbeat /opt/protologbeat ;\
chmod 750 /opt/protologbeat ;\
chmod 700 /opt/protologbeat/ssl

WORKDIR /opt/protologbeat


USER protologbeat





CMD ["protologbeat", "-e", "-c", "/opt/protologbeat/conf/protologbeat.yml"]
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -79,6 +79,14 @@ in the same directory with the name protologbeat.
make
```

If you'd like to build the binary for OSX, Linux and/or Windows, you can run the following:

```
./build-bin [TAG_VERSION]
```

The resulting binaries will be placed in the `bin/` directory


### Run

Expand Down
70 changes: 70 additions & 0 deletions protologbeat-docker.yml
@@ -0,0 +1,70 @@
################### Protologbeat Configuration Example #########################

############################# Protologbeat ######################################

protologbeat:
address: ${ADDRESS:0.0.0.0}
port: ${PORT:6000}
protocol: ${PROTOCOL:udp}
max_msg_size: ${MAX_MSG_SIZE:4096}
default_es_log_type: ${DEFAULT_ES_TYPE:protologbeat}


#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging

#================================ Outputs =====================================

# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.
output.console:
enabled: ${CONSOLE_OUTPUT_ENABED:false}
pretty: true

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["${ES_HOST:127.0.0.1}:${ES_PORT:9200}"]

# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"

#----------------------------- Logstash output --------------------------------
#output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]
9 changes: 0 additions & 9 deletions protologbeat.yml
Expand Up @@ -7,16 +7,7 @@ protologbeat:
port: 6000
protocol: udp
max_msg_size: 4096
json_mode: true
default_es_log_type: protologbeat
merge_fields_to_root: true
enable_syslog_format_only: false
enable_json_validation: false
validate_all_json_types: false
json_schema:
email_contact: "/usr/local/go/src/github.com/hartfordfive/protologbeat/_samples/app1_schema.json"
stock_item: "/usr/local/go/src/github.com/hartfordfive/protologbeat/_samples/app2_schema.json"
debug: true


#================================ General =====================================
Expand Down

0 comments on commit 6c3a28b

Please sign in to comment.