Skip to content

Commit

Permalink
Merge pull request #18 from solarwinds/update-syslog
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
girishranganathan authored Jan 28, 2021
2 parents eb42d76 + af07d41 commit dc4bf2a
Show file tree
Hide file tree
Showing 444 changed files with 46,231 additions and 21,904 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 1
- uses: golangci/[email protected]
with:
version: v1.32
version: v1.35
args: --allow-parallel-runners --timeout 3m ./...
build:
name: build check
Expand All @@ -45,6 +45,6 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ secrets.GO_VERSION }}
go-version: 1.15.7
- run: make build

11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright 2019 SolarWinds Worldwide, LLC.
# SPDX-License-Identifier: Apache-2.0

FROM golang:1.15.1-alpine as main
FROM golang:1.15.7-alpine as main
RUN apk update && apk add --no-cache git ca-certificates wget && update-ca-certificates
RUN wget -O /etc/ssl/certs/papertrail-bundle.pem https://papertrailapp.com/tools/papertrail-bundle.pem
WORKDIR /github.com/solarwinds/rkubelog
ADD . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -ldflags='-w -s -extldflags "-static"' -a -o /rkubelog .
RUN CGO_ENABLED=0 go build -mod vendor -ldflags='-w -s -extldflags "-static"' -a -o /rkubelog .

FROM alpine
FROM alpine:3.13.0
COPY --from=main /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=main /etc/ssl/certs/papertrail-bundle.pem /etc/ssl/certs/
COPY --from=main /rkubelog /app/rkubelog
USER 1001
WORKDIR /app
ENTRYPOINT ./rkubelog
RUN mkdir db; chmod -R 777 db
USER 1001
ENTRYPOINT ["/app/rkubelog"]
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ To deploy rkubelog:
- Preview the deployment using `kubectl apply -k . --dry-run -o yaml`
- If all looks good, apply the deployment using `kubectl apply -k .`


If you run into issues, please read the _Troubleshooting_ section at the end of this document.

### Papertrail
### Static Tags
We have recently added the ability to set static tags which will get sent with all the logs.

If you are using several instances of `rKubeLog`, you can use this `TAGS` field to differentiate between the logs from the different environments.

If you are interested in using this capability, you can set the value for `TAGS` in the `logging-config-patch.yaml` file. The value can be any string.


### Using Papertrail

In order to ship logs to Papertrail, you will need a Papertrail account. If you don't have one already, you can sign up for one [here](https://www.papertrail.com/). After you are logged in, you will need to create a `Log Destination` from under the `Settings` menu. When a log destination is created, you will be given a host:port combo.

Expand All @@ -25,11 +34,11 @@ The Papertrail credentials are automatically pulled from a secret named 'logging
- `PAPERTRAIL_PROTOCOL` - Acceptable values are udp, tcp, tls. This also depends on the choices that are selected under the `Destination Settings`; by default, a new destination accepts TLS and UDP connections.
- `PAPERTRAIL_HOST` - Log destination host
- `PAPERTRAIL_PORT` - Log destination port
- `LOGGLY_TOKEN` set to `XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` to disable Loggly
- `LOGGLY_TOKEN` set to `` to disable Loggly

For any help with Papertrail, please check out their help page [here](https://documentation.solarwinds.com/en/Success_Center/papertrail/Content/papertrail_Documentation.htm).

### Loggly
### Using Loggly

In order to ship logs to Loggly, you will need a Loggly account. If you don't have one already you can sign up for one [here](https://www.loggly.com/). After you are logged in, you will need to create a `Customer Token` from under the `Source Setup` menu item.

Expand All @@ -39,12 +48,15 @@ The Loggly credentials are automatically pulled from a secret named 'logging-sec

Also add these default values to disable Papertrail logging (following are just samples, please use your account specific values):

- `PAPERTRAIL_PROTOCOL=tcp`
- `PAPERTRAIL_HOST=logsX.papertrailapp.com`
- `PAPERTRAIL_PORT=XXXXX`
- `PAPERTRAIL_PROTOCOL=`
- `PAPERTRAIL_HOST=`
- `PAPERTRAIL_PORT=`

For any help with Loggly, please checkout their help page [here](https://documentation.solarwinds.com/en/Success_Center/loggly/).


__Please note:__ If you want to send logs to both Loggly and Papertrail, you can configure both Loggly and Papertrail related values above to valid ones. Most will only want to use one or the other.

## Development

> __Info:__ You only need to reference this section if you plan to contribute to the rkubelog development.
Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ require (
github.com/boz/go-logutil v0.1.0
github.com/boz/kail v0.15.0
github.com/boz/kcache v0.4.0
github.com/kr/pretty v0.2.0 // indirect
github.com/pkg/errors v0.9.1
github.com/segmentio/go-loggly v0.5.0
github.com/sirupsen/logrus v1.6.0
github.com/solarwinds/papertrail-go v0.0.0-20200520233511-9f29fa6d104e
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
github.com/sirupsen/logrus v1.7.0
github.com/solarwinds/papertrail-go v0.0.0-20210128013555-edd1abecd697
github.com/stretchr/testify v1.5.1 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6
k8s.io/apimachinery v0.0.0-20190515023456-b74e4c97951f
k8s.io/client-go v0.0.0-20190514184034-dd7f3ad83f18
Expand Down
Loading

0 comments on commit dc4bf2a

Please sign in to comment.