From d6e970c453012efe9e3d9695f539eb0116b6e681 Mon Sep 17 00:00:00 2001 From: shifter Date: Tue, 1 Aug 2023 17:34:01 +0200 Subject: [PATCH 1/7] github workflow cleanup (security checks removed temporary) --- .github/workflows/artifacts.yaml | 54 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml index 542d672..6b5e2f1 100644 --- a/.github/workflows/artifacts.yaml +++ b/.github/workflows/artifacts.yaml @@ -109,31 +109,31 @@ jobs: id: image-ref run: echo "value=${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}" >> "$GITHUB_OUTPUT" - - name: Fetch image - run: skopeo --insecure-policy copy docker://${{ steps.image-name.outputs.value }}:${{ steps.meta.outputs.version }} oci-archive:image.tar - if: inputs.publish - - - name: Extract OCI tarball - run: | - mkdir -p image - tar -xf image.tar -C image - - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # 0.11.2 - with: - input: image - format: sarif - output: trivy-results.sarif - - - name: Upload Trivy scan results as artifact - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: "[${{ github.job }}] Trivy scan results" - path: trivy-results.sarif - retention-days: 5 - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0 - with: - sarif_file: trivy-results.sarif + # - name: Fetch image + # run: skopeo --insecure-policy copy docker://${{ steps.image-name.outputs.value }}:${{ steps.meta.outputs.version }} oci-archive:image.tar + # if: inputs.publish + + # - name: Extract OCI tarball + # run: | + # mkdir -p image + # tar -xf image.tar -C image + + # - name: Run Trivy vulnerability scanner + # uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # 0.11.2 + # with: + # input: image + # format: sarif + # output: trivy-results.sarif + + # - name: Upload Trivy scan results as artifact + # uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + # with: + # name: "[${{ github.job }}] Trivy scan results" + # path: trivy-results.sarif + # retention-days: 5 + + # - name: Upload Trivy scan results to GitHub Security tab + # uses: github/codeql-action/upload-sarif@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0 + # with: + # sarif_file: trivy-results.sarif From 36bfcfe29e5f054ebc7abd1674e070122ee7d80a Mon Sep 17 00:00:00 2001 From: shifter Date: Wed, 2 Aug 2023 10:18:57 +0200 Subject: [PATCH 2/7] unnecessary garden changes removed --- garden.yml | 1 - project.garden.yml | 25 ------------------------- 2 files changed, 26 deletions(-) delete mode 100644 project.garden.yml diff --git a/garden.yml b/garden.yml index eef6485..dad1348 100644 --- a/garden.yml +++ b/garden.yml @@ -3,6 +3,5 @@ description: syslog-ng metrics exporter image name: metrics-exporter-image type: container dockerfile: Dockerfile -image: ${var.imageRegistry}/${var.imageRepository}/metrics-exporter build: targetImage: prod diff --git a/project.garden.yml b/project.garden.yml deleted file mode 100644 index b72394e..0000000 --- a/project.garden.yml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Project -name: metrics-exporter -defaultEnvironment: local -dotIgnoreFiles: [.gitignore, .gardenignore] -variables: - imageRegistry: axoflow.local - imageRepository: dev - -environments: -- name: local - defaultNamespace: axoflow-local - variables: - base-hostname: axoflow.garden - -providers: - - name: local-kubernetes - environments: [local] - namespace: ${environment.namespace} - defaultHostname: ${var.base-hostname} - ingressClass: nginx - setupIngressController: false - -modules: - include: - - ./*garden.yml From 7fcea3df167eba7fb98fdaed335caa20563ca6cd Mon Sep 17 00:00:00 2001 From: shifter Date: Wed, 2 Aug 2023 10:19:26 +0200 Subject: [PATCH 3/7] licensei added --- .gitignore | 2 ++ .licensei.toml | 23 +++++++++++++++++++++++ Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 .licensei.toml diff --git a/.gitignore b/.gitignore index 4d18da4..513d926 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,10 @@ # Dependency directories (remove the comment below to include it) # vendor/ +bin/ dist/ .idea .vscode .garden +.licensei.cache diff --git a/.licensei.toml b/.licensei.toml new file mode 100644 index 0000000..64fcb9b --- /dev/null +++ b/.licensei.toml @@ -0,0 +1,23 @@ +approved = [ + "apache-2.0", + "bsd-2-clause", + "bsd-3-clause", + "isc", + "mit", + "mit-0", +] + +ignored = [ + "github.com/gogo/protobuf", # Custom license + "google.golang.org/protobuf", # Unsupported VCS, bsd-3-clause + "sigs.k8s.io/yaml", # MIT + Custom license + "github.com/hashicorp/go-envparse", # MPL-2.0, but we should get rid of it when replacing node_exporter + "emperror.dev/errors", # MIT + "github.com/soundcloud/go-runit", # repository removed, indirect, MIT +] + +[header] +ignoreFiles = ["zz_generated.*.go", "generated.go", "cache.go"] +authors = ["Axoflow"] +template = """// Copyright © :YEAR: :AUTHOR: +// All rights reserved.""" diff --git a/Makefile b/Makefile index ecb2038..c58947e 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,18 @@ +GOARCH := $(shell go env GOARCH) +GOOS := $(shell go env GOOS) +GOVERSION := $(shell go env GOVERSION) + DIST ?= ${PWD}/dist GIT_TAG_COMMAND = git describe --always --dirty --tags 2>/dev/null GIT_TAG ?= $(shell ${GIT_TAG_COMMAND} || cat .version-tag 2>/dev/null || echo dev) GO_LDFLAGS := -X 'main.Version=${GIT_TAG}' +# build tools +BIN ?= ${PWD}/bin/${GOOS}/${GOARCH} + +LICENSEI := ${BIN}/licensei +LICENSEI_VERSION = v0.8.0 + .PHONY: fmt fmt: ## format Go sources go fmt ./... @@ -23,6 +33,45 @@ run: ## runs project locally with go run docker-build: ## builds docker container locally docker build . -t "axoflow.local.dev/metrics-exporter:latest" -f Dockerfile +.PHONY: test +test: ## runs unit tests + go test ./... + +## ========================= +## == Tool dependencies == +## ========================= + +${BIN}: + mkdir -p $@ + +${LICENSEI}: ${LICENSEI}_${LICENSEI_VERSION}_${GOVERSION} | ${BIN} + +.PHONY: check-license +check-license: ${LICENSEI} .licensei.cache ## check license + copyright headers + ${LICENSEI} check + ${LICENSEI} header + +${LICENSEI}: ${LICENSEI}_${LICENSEI_VERSION}_${GOVERSION} + ln -sf $(notdir $<) $@ + +${LICENSEI}_${LICENSEI_VERSION}_${GOVERSION}: IMPORT_PATH := github.com/goph/licensei/cmd/licensei +${LICENSEI}_${LICENSEI_VERSION}_${GOVERSION}: VERSION := ${LICENSEI_VERSION} +${LICENSEI}_${LICENSEI_VERSION}_${GOVERSION}: | ${BIN} + ${go_install_binary} + +.licensei.cache: ${LICENSEI} +ifndef GITHUB_TOKEN + @>&2 echo "WARNING: building licensei cache without Github token, rate limiting might occur." + @>&2 echo "(Hint: If too many licenses are missing, try specifying a Github token via the environment variable GITHUB_TOKEN.)" +endif + ${LICENSEI} cache + +define go_install_binary +find ${BIN} -name '$(notdir ${IMPORT_PATH})_*' -exec rm {} + +GOBIN=${BIN} go install ${IMPORT_PATH}@${VERSION} +mv ${BIN}/$(notdir ${IMPORT_PATH}) $@ +endef + # Self-documenting Makefile .DEFAULT_GOAL = help .PHONY: help From b5bd74264c6b7efc43113d54dfeca1ca65149637 Mon Sep 17 00:00:00 2001 From: shifter Date: Wed, 2 Aug 2023 11:50:22 +0200 Subject: [PATCH 4/7] go basic checks github workflow added --- .github/workflows/go-lint-and-test.yml | 59 ++++++++++++++++++++++++++ Makefile | 14 ++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/go-lint-and-test.yml diff --git a/.github/workflows/go-lint-and-test.yml b/.github/workflows/go-lint-and-test.yml new file mode 100644 index 0000000..0b54f61 --- /dev/null +++ b/.github/workflows/go-lint-and-test.yml @@ -0,0 +1,59 @@ +name: Go basic checks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + check-license: + name: Check licenses + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' + - name: Check out code + uses: actions/checkout@v3 + - name: Cache licenses + uses: actions/cache@v3 + with: + key: licensei-cache-${{ hashFiles('go.sum') }} + path: ".licensei.cache" + restore-keys: licensei-cache + - name: Ensure licensei cache + env: + GITHUB_TOKEN: ${{ github.token }} + run: make .licensei.cache + - name: Run license check + run: make check-license + + run-test: + name: Go tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' + - name: Check out code + uses: actions/checkout@v3 + - name: Run tests + run: make test + + run-lint: + name: Go lint + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' + - name: Check out code + uses: actions/checkout@v3 + - name: Run lint + run: make lint + env: + LINTER_FLAGS: '--timeout 5m' diff --git a/Makefile b/Makefile index c58947e..e830055 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ BIN ?= ${PWD}/bin/${GOOS}/${GOARCH} LICENSEI := ${BIN}/licensei LICENSEI_VERSION = v0.8.0 +GOLANGCI_LINT := ${BIN}/golangci-lint +GOLANGCI_LINT_VERSION := v1.51.2 .PHONY: fmt fmt: ## format Go sources @@ -37,6 +39,10 @@ docker-build: ## builds docker container locally test: ## runs unit tests go test ./... +.PHONY: lint +lint: ${GOLANGCI_LINT} ## check coding style + ${GOLANGCI_LINT} run ${LINTER_FLAGS} + ## ========================= ## == Tool dependencies == ## ========================= @@ -66,6 +72,14 @@ ifndef GITHUB_TOKEN endif ${LICENSEI} cache +${GOLANGCI_LINT}: ${GOLANGCI_LINT}_${GOLANGCI_LINT_VERSION}_${GOVERSION} | ${BIN} + ln -sf $(notdir $<) $@ + +${GOLANGCI_LINT}_${GOLANGCI_LINT_VERSION}_${GOVERSION}: IMPORT_PATH := github.com/golangci/golangci-lint/cmd/golangci-lint +${GOLANGCI_LINT}_${GOLANGCI_LINT_VERSION}_${GOVERSION}: VERSION := ${GOLANGCI_LINT_VERSION} +${GOLANGCI_LINT}_${GOLANGCI_LINT_VERSION}_${GOVERSION}: | ${BIN} + ${go_install_binary} + define go_install_binary find ${BIN} -name '$(notdir ${IMPORT_PATH})_*' -exec rm {} + GOBIN=${BIN} go install ${IMPORT_PATH}@${VERSION} From 88fd53229e3ee965149044f25164bc617a35a1e7 Mon Sep 17 00:00:00 2001 From: shifter Date: Wed, 2 Aug 2023 16:23:28 +0200 Subject: [PATCH 5/7] basic runtime argument handling for: --socket.path: sets the syslog-ng control socket file path, defaults to CONTROL_SOCKET env variable or "/var/run/syslog-ng/syslog-ng.tcl" if none of them set --service.port: sets the listening port of the metrics-exporter service, defaults to SERVICE_PORT or "9577" when none of them is set --service.timeout: sets the syslog control socket read timeout, defaults to SERVICE_TIMEOUT or "5s" when none of them is set --- main.go | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 2bf75c1..980726f 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ package main import ( "bytes" "context" + "flag" "fmt" "io" "net/http" @@ -17,30 +18,53 @@ import ( ) const ( - TIMEOUT_SYSLOG time.Duration = time.Second * 3 - HTTP_PORT = 9999 + DEFAULT_TIMEOUT_SYSLOG time.Duration = time.Second * 5 + DEFAULT_SERVICE_PORT = "9577" + DEFAULT_SOCKET_ADDR = "/var/run/syslog-ng/syslog-ng.tcl" ) var ( Version = "dev" // should be set build-time, see Makefile ) +type RunArgs struct { + SocketAddr string + ServicePort string + RequestTimeout string +} + +func envOrDef(envName string, def string) (res string) { + res = os.Getenv(envName) + if res == "" { + res = def + } + return +} + func main() { + runArgs := RunArgs{} + fmt.Fprintf(os.Stdout, "metrics exporter version %q\n", Version) - socketAddr := os.Getenv("CONTROL_SOCKET") - if socketAddr == "" { - socketAddr = "/var/run/syslog-ng/syslog-ng.tcl" - _, _ = fmt.Fprintf(os.Stdout, "CONTROL_SOCKET environment variable not set, defaulting to %q", socketAddr) + flag.StringVar(&runArgs.SocketAddr, "socket.path", envOrDef("CONTROL_SOCKET", DEFAULT_SOCKET_ADDR), "syslog-ng control socket path") + flag.StringVar(&runArgs.ServicePort, "service.port", envOrDef("SERVICE_PORT", DEFAULT_SERVICE_PORT), "service port") + flag.StringVar(&runArgs.RequestTimeout, "service.timeout", envOrDef("SERVICE_TIMEOUT", DEFAULT_TIMEOUT_SYSLOG.String()), "request timeout") + + flag.Parse() + + requestTimeout, err := time.ParseDuration(runArgs.RequestTimeout) + if err != nil { + requestTimeout = DEFAULT_TIMEOUT_SYSLOG } ctl := syslogngctl.Controller{ - ControlChannel: syslogngctl.NewUnixDomainSocketControlChannel(socketAddr), + ControlChannel: syslogngctl.NewUnixDomainSocketControlChannel(runArgs.SocketAddr), } mux := http.NewServeMux() mux.HandleFunc("/metrics", func(w http.ResponseWriter, r *http.Request) { - subCtx, cancel := context.WithTimeout(r.Context(), TIMEOUT_SYSLOG) + + subCtx, cancel := context.WithTimeout(r.Context(), requestTimeout) defer cancel() mfs, err := ctl.StatsPrometheus(subCtx) if err != nil { @@ -65,7 +89,7 @@ func main() { }) mux.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) { - subCtx, cancel := context.WithTimeout(r.Context(), TIMEOUT_SYSLOG) + subCtx, cancel := context.WithTimeout(r.Context(), requestTimeout) defer cancel() err := ctl.Ping(subCtx) if err != nil { @@ -78,8 +102,9 @@ func main() { } }) - fmt.Fprintf(os.Stdout, "listening on port %v, \n", HTTP_PORT) - fmt.Fprintf(os.Stdout, "syslog-ng control socket path %v, \n", socketAddr) + fmt.Fprintf(os.Stdout, "listening on port: %v\n", runArgs.ServicePort) + fmt.Fprintf(os.Stdout, "syslog-ng control socket path: %v\n", runArgs.SocketAddr) + fmt.Fprintf(os.Stdout, "service timeout: %v\n", requestTimeout.String()) - fmt.Println(http.ListenAndServe(fmt.Sprintf(":%v", HTTP_PORT), mux)) + fmt.Println(http.ListenAndServe(fmt.Sprintf(":%v", runArgs.ServicePort), mux)) } From 9bca86a192d999dc2b159133635fa407654c60df Mon Sep 17 00:00:00 2001 From: shifter Date: Wed, 2 Aug 2023 16:38:20 +0200 Subject: [PATCH 6/7] project renamed to axosyslog-metrics-exporter --- Dockerfile | 4 ++-- Makefile | 4 ++-- garden.yml | 2 +- go.mod | 6 +++--- main.go | 5 +++-- pkg/syslog-ng-ctl/cmd/main.go | 2 +- pkg/syslog-ng-ctl/go.mod | 2 +- pkg/syslog-ng-ctl/io/read_until.go | 2 +- pkg/syslog-ng-ctl/rw_ctrl_chan.go | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6de7717..0dfea8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,5 +32,5 @@ FROM gcr.io/distroless/base-debian11:latest as prod WORKDIR / COPY --from=builder /LICENSE / -COPY --from=builder /app/dist/metrics-exporter . -ENTRYPOINT ["/metrics-exporter"] +COPY --from=builder /app/dist/axosyslog-metrics-exporter . +ENTRYPOINT ["/axosyslog-metrics-exporter"] diff --git a/Makefile b/Makefile index e830055..838ef56 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ tidy: ## ensures go.mod dependecies .PHONY: build build: ## build - go build -o $(DIST)/metrics-exporter -ldflags="$(GO_LDFLAGS)" $(BUILDFLAGS) ./ + go build -o $(DIST)/axosyslog-metrics-exporter -ldflags="$(GO_LDFLAGS)" $(BUILDFLAGS) ./ .PHONY: run run: ## runs project locally with go run @@ -33,7 +33,7 @@ run: ## runs project locally with go run .PHONY: docker-build docker-build: ## builds docker container locally - docker build . -t "axoflow.local.dev/metrics-exporter:latest" -f Dockerfile + docker build . -t "axoflow.local.dev/axosyslog-metrics-exporter:latest" -f Dockerfile .PHONY: test test: ## runs unit tests diff --git a/garden.yml b/garden.yml index dad1348..f583efa 100644 --- a/garden.yml +++ b/garden.yml @@ -1,6 +1,6 @@ kind: Module description: syslog-ng metrics exporter image -name: metrics-exporter-image +name: axosyslog-metrics-exporter-image type: container dockerfile: Dockerfile build: diff --git a/go.mod b/go.mod index 66b07f8..6b5ab8d 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ -module github.com/axoflow/metrics-exporter +module github.com/axoflow/axosyslog-metrics-exporter go 1.20 -replace github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl => ./pkg/syslog-ng-ctl +replace github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl => ./pkg/syslog-ng-ctl require ( - github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl v0.0.0-00010101000000-000000000000 + github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl v0.0.0-00010101000000-000000000000 github.com/prometheus/common v0.44.0 ) diff --git a/main.go b/main.go index 980726f..f14525b 100644 --- a/main.go +++ b/main.go @@ -11,9 +11,10 @@ import ( "io" "net/http" "os" + "path/filepath" "time" - syslogngctl "github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl" + syslogngctl "github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl" "github.com/prometheus/common/expfmt" ) @@ -44,7 +45,7 @@ func envOrDef(envName string, def string) (res string) { func main() { runArgs := RunArgs{} - fmt.Fprintf(os.Stdout, "metrics exporter version %q\n", Version) + fmt.Fprintf(os.Stdout, "%v version %q\n", filepath.Base(os.Args[0]), Version) flag.StringVar(&runArgs.SocketAddr, "socket.path", envOrDef("CONTROL_SOCKET", DEFAULT_SOCKET_ADDR), "syslog-ng control socket path") flag.StringVar(&runArgs.ServicePort, "service.port", envOrDef("SERVICE_PORT", DEFAULT_SERVICE_PORT), "service port") diff --git a/pkg/syslog-ng-ctl/cmd/main.go b/pkg/syslog-ng-ctl/cmd/main.go index 9958fa5..a634a0a 100644 --- a/pkg/syslog-ng-ctl/cmd/main.go +++ b/pkg/syslog-ng-ctl/cmd/main.go @@ -9,7 +9,7 @@ import ( "os" "strings" - syslogngctl "github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl" + syslogngctl "github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl" "github.com/prometheus/common/expfmt" "golang.org/x/exp/slices" ) diff --git a/pkg/syslog-ng-ctl/go.mod b/pkg/syslog-ng-ctl/go.mod index 199b80a..5c36ebf 100644 --- a/pkg/syslog-ng-ctl/go.mod +++ b/pkg/syslog-ng-ctl/go.mod @@ -1,4 +1,4 @@ -module github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl +module github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl go 1.20 diff --git a/pkg/syslog-ng-ctl/io/read_until.go b/pkg/syslog-ng-ctl/io/read_until.go index 9b3cdb1..339dd2f 100644 --- a/pkg/syslog-ng-ctl/io/read_until.go +++ b/pkg/syslog-ng-ctl/io/read_until.go @@ -7,7 +7,7 @@ import ( "bytes" "io" - bytesx "github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl/bytes" + bytesx "github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl/bytes" ) // ReadUntil reads from the specified reader until it reaches the specified separator (or an error occurs, which includes EOF). diff --git a/pkg/syslog-ng-ctl/rw_ctrl_chan.go b/pkg/syslog-ng-ctl/rw_ctrl_chan.go index 838d803..5210de2 100644 --- a/pkg/syslog-ng-ctl/rw_ctrl_chan.go +++ b/pkg/syslog-ng-ctl/rw_ctrl_chan.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - iox "github.com/axoflow/metrics-exporter/pkg/syslog-ng-ctl/io" + iox "github.com/axoflow/axosyslog-metrics-exporter/pkg/syslog-ng-ctl/io" ) // NewReadWriterControlChannel creates an object that can send a syslog-ng-ctl command and return the response. From 4fb24dea9947fd9039c38e83bc11e4cd2d3dd73f Mon Sep 17 00:00:00 2001 From: shifter Date: Thu, 3 Aug 2023 09:40:40 +0200 Subject: [PATCH 7/7] review changes --- .licensei.toml | 5 ----- main.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.licensei.toml b/.licensei.toml index 64fcb9b..1ac1a90 100644 --- a/.licensei.toml +++ b/.licensei.toml @@ -8,12 +8,7 @@ approved = [ ] ignored = [ - "github.com/gogo/protobuf", # Custom license "google.golang.org/protobuf", # Unsupported VCS, bsd-3-clause - "sigs.k8s.io/yaml", # MIT + Custom license - "github.com/hashicorp/go-envparse", # MPL-2.0, but we should get rid of it when replacing node_exporter - "emperror.dev/errors", # MIT - "github.com/soundcloud/go-runit", # repository removed, indirect, MIT ] [header] diff --git a/main.go b/main.go index f14525b..f0b9598 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ import ( const ( DEFAULT_TIMEOUT_SYSLOG time.Duration = time.Second * 5 DEFAULT_SERVICE_PORT = "9577" - DEFAULT_SOCKET_ADDR = "/var/run/syslog-ng/syslog-ng.tcl" + DEFAULT_SOCKET_ADDR = "/var/run/syslog-ng/syslog-ng.ctl" ) var (